Skip to content

Commit

Permalink
CI: Use coverage.py when running Ubuntu tests
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix committed Jan 20, 2024
1 parent 79741c8 commit 2b6baa9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/test_thorough.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
# fail on non-zero return code from a subprocess
set -e

grass --tmp-location XY --exec \
g.download.location url=https://grass.osgeo.org/sampledata/north_carolina/nc_spm_full_v2alpha2.tar.gz path=$HOME
if [[ -z "${PYTHON}" ]]; then
PYTHON="python3"
else
PYTHON="${PYTHON}"
fi


grass --tmp-location XY --exec \
python3 -m grass.gunittest.main \
${PYTHON} -m grass.gunittest.main \
--grassdata $HOME --location nc_spm_full_v2alpha2 --location-type nc \
--min-success 100
4 changes: 3 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Get dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils
sudo apt-get install -y wget git gawk findutils python3-coverage
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
Expand Down Expand Up @@ -84,6 +84,8 @@ jobs:

- name: Run tests
run: .github/workflows/test_thorough.sh
env:
PYTHON: coverage run

- name: Make HTML test report available
if: ${{ always() }}
Expand Down

0 comments on commit 2b6baa9

Please sign in to comment.