Skip to content

db.columns: added support for -e to print more column information #14895

db.columns: added support for -e to print more column information

db.columns: added support for -e to print more column information #14895

Workflow file for this run

---
name: pytest
on:
push:
branches:
- main
- releasebranch_*
pull_request:
permissions: {}
jobs:
pytest:
concurrency:
group: >-
${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}-${{
matrix.os }}-${{ matrix.python-version }}
cancel-in-progress: true
strategy:
matrix:
os:
- ubuntu-24.04
python-version:
- "3.10"
- "3.13"
fail-fast: true
runs-on: ${{ matrix.os }}
env:
FORCE_COLOR: 1 # for software including pip: https://force-color.org/
CLICOLOR_FORCE: 1 # for other software including ninja: https://bixense.com/clicolors/
PYTHONWARNINGS: always
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: ${{ matrix.python-version }}
cache: pip # zizmor: ignore[cache-poisoning] This pytest workflow not used for release artifacts
allow-prereleases: true
- name: Install non-Python dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils
LC_ALL=C.UTF-8 sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update -y
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install --break-system-packages -r .github/workflows/python_requirements.txt
pip install --break-system-packages -r .github/workflows/optional_requirements.txt
pip install --break-system-packages pytest pytest-timeout \
pytest-github-actions-annotate-failures pytest-xdist pytest-cov
- name: Create installation directory
run: |
mkdir "${HOME}/install"
- name: Set number of cores for compilation
run: |
echo "MAKEFLAGS=-j$(nproc)" >> "${GITHUB_ENV}"
- name: Build
run: |
".github/workflows/build_${MATRIX_OS}.sh" "${HOME}/install"
env:
MATRIX_OS: ${{ matrix.os }}
- name: Add the bin directory to PATH
run: |
echo "${HOME}/install/bin" >> "${GITHUB_PATH}"
- name: Print installed versions
if: always()
run: .github/workflows/print_versions.sh
- name: Test executing of the grass command
run: .github/workflows/test_simple.sh
- name: Run pytest with multiple workers in parallel
run: |
PYTHONPATH="$(grass --config python_path):${PYTHONPATH}"
LD_LIBRARY_PATH="$(grass --config path)/lib:${LD_LIBRARY_PATH}"
INITIAL_GISBASE="$(grass --config path)"
INITIAL_PWD="${PWD}"
export PYTHONPATH
export LD_LIBRARY_PATH
export INITIAL_GISBASE
export INITIAL_PWD
pytest \
@.github/workflows/pytest_args_ci.txt \
@.github/workflows/pytest_args_cov.txt \
@.github/workflows/pytest_args_parallel.txt \
--junitxml=pytest.xdist.junit.xml \
-k 'not testsuite'
- name: Run pytest with a single worker (for tests marked with needs_solo_run)
run: |
PYTHONPATH="$(grass --config python_path):${PYTHONPATH}"
LD_LIBRARY_PATH="$(grass --config path)/lib:${LD_LIBRARY_PATH}"
INITIAL_GISBASE="$(grass --config path)"
INITIAL_PWD="${PWD}"
export PYTHONPATH
export LD_LIBRARY_PATH
export INITIAL_GISBASE
export INITIAL_PWD
pytest \
@.github/workflows/pytest_args_ci.txt \
@.github/workflows/pytest_args_cov.txt \
@.github/workflows/pytest_args_not_parallel.txt \
--junitxml=pytest.needs_solo_run.junit.xml \
-k 'not testsuite'
- name: Run pytest with a single worker (for gunittest-based tests)
run: |
PYTHONPATH="$(grass --config python_path):${PYTHONPATH}"
LD_LIBRARY_PATH="$(grass --config path)/lib:${LD_LIBRARY_PATH}"
INITIAL_GISBASE="$(grass --config path)"
INITIAL_PWD="${PWD}"
export PYTHONPATH
export LD_LIBRARY_PATH
export INITIAL_GISBASE
export INITIAL_PWD
pytest \
@.github/workflows/pytest_args_cov.txt \
@.github/workflows/pytest_args_gunittest.txt \
--junitxml=pytest.gunittest.junit.xml
- name: Fix non-standard installed script paths in coverage data
run: |
PYTHONPATH="$(grass --config python_path):${PYTHONPATH}"
LD_LIBRARY_PATH="$(grass --config path)/lib:${LD_LIBRARY_PATH}"
INITIAL_GISBASE="$(grass --config path)"
INITIAL_PWD="${PWD}"
export PYTHONPATH
export LD_LIBRARY_PATH
export INITIAL_GISBASE
export INITIAL_PWD
python utils/coverage_mapper.py
coverage combine
coverage html
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
with:
exclude: gui
flags: pytest-python-${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
verbose: true
flags: pytest-python-${{ matrix.python-version }}
name: pytest-python-${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: Make python-only code coverage test report available
if: ${{ !cancelled() }}
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: python-codecoverage-report-${{ matrix.os }}-${{ matrix.python-version }}
path: coverage_html_report
retention-days: 1
pytest-success:
name: pytest Result
needs:
- pytest
if: ${{ always() }}
uses: ./.github/workflows/verify-success.yml
with:
needs_context: ${{ toJson(needs) }}