Skip to content

Add a formatting error in db.copy #569

Add a formatting error in db.copy

Add a formatting error in db.copy #569

Workflow file for this run

---
name: pytest
on:
push:
branches:
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*
- '*'
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-22.04
python-version:
- '3.8'
- '3.10'
- '3.12'
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install non-Python dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r .github/workflows/python_requirements.txt
pip install -r .github/workflows/optional_requirements.txt
pip install 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:
CFLAGS: -fPIC --coverage -g -O0 -fprofile-abs-path
CXXFLAGS: -fPIC --coverage -g -O0 -fprofile-abs-path
LDFLAGS: --coverage
- 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
run: |
export PYTHONPATH=`grass --config python_path`:$PYTHONPATH
export LD_LIBRARY_PATH=$HOME/install/grass84/lib:$LD_LIBRARY_PATH
INITIAL_PWD="${PWD}" pytest --verbose --color=yes --cov --cov-branch --numprocesses auto . --dist worksteal
env:
INITIAL_GISBASE: $HOME/install/grass84
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
verbose: true
# gcov: true
flags: pytest-python-${{ matrix.python-version }}
name: pytest-python-${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
pytest-success:
name: pytest Result
needs:
- pytest
if: ${{ always() }}
uses: ./.github/workflows/verify-success.yml
with:
needs_context: ${{ toJson(needs) }}