Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,30 @@ jobs:
-ra . \
-m 'needs_solo_run'

- name: Cache GRASS Sample Dataset
id: cached-data
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
with:
path: sample-data/nc_spm_full_v2alpha2.tar.gz
key: nc_spm_full_v2alpha2.tar.gz
enableCrossOsArchive: true

- name: Download GRASS Sample Dataset
if: steps.cached-data.outputs.cache-hit != 'true'
run: |
mkdir -p sample-data
curl -L "$SAMPLE_DATA" -o sample-data/nc_spm_full_v2alpha2.tar.gz
env:
SAMPLE_DATA: "https://grass.osgeo.org/sampledata/north_carolina/\
nc_spm_full_v2alpha2.tar.gz"

- name: Run gunittest tests
shell: micromamba-shell {0}
run: |
grass --tmp-project XY --exec \
g.download.project url=${{ env.SampleData }} path=$HOME
grass --tmp-project XY --exec \
python3 -m grass.gunittest.main \
--grassdata $HOME --location nc_spm_full_v2alpha2 --location-type nc \
--min-success 100 --config .github/workflows/macos_gunittest.cfg
run: .github/workflows/test_thorough.sh --config .github/workflows/macos_gunittest.cfg
env:
SampleData: "https://grass.osgeo.org/sampledata/north_carolina/\
SAMPLE_DATA_URL: "file://${{ github.workspace }}/sample-data/\
nc_spm_full_v2alpha2.tar.gz"

- name: Make HTML test report available
if: ${{ !cancelled() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_thorough.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
# fail on non-zero return code from a subprocess
set -e

SAMPLE_DATA_URL=${SAMPLE_DATA_URL:-"https://grass.osgeo.org/sampledata/north_carolina/nc_spm_full_v2alpha2.tar.gz"}

grass --tmp-project XY --exec \
g.download.project url=https://grass.osgeo.org/sampledata/north_carolina/nc_spm_full_v2alpha2.tar.gz path=$HOME
g.download.project url=$SAMPLE_DATA_URL path=$HOME

grass --tmp-project XY --exec \
python3 -m grass.gunittest.main \
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,28 @@ jobs:
- name: Test executing of the grass command
run: .github/workflows/test_simple.sh

- name: Cache GRASS Sample Dataset
id: cached-data
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
with:
path: sample-data/nc_spm_full_v2alpha2.tar.gz
key: nc_spm_full_v2alpha2.tar.gz
enableCrossOsArchive: true

- name: Download GRASS Sample Dataset
if: steps.cached-data.outputs.cache-hit != 'true'
run: |
mkdir -p sample-data
curl -L "$SAMPLE_DATA" -o sample-data/nc_spm_full_v2alpha2.tar.gz
env:
SAMPLE_DATA: "https://grass.osgeo.org/sampledata/north_carolina/\
nc_spm_full_v2alpha2.tar.gz"

- name: Run tests
run: .github/workflows/test_thorough.sh --config .gunittest.extra.cfg
env:
SAMPLE_DATA_URL: "file://${{ github.workspace }}/sample-data/\
nc_spm_full_v2alpha2.tar.gz"

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