Skip to content
Open
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
62 changes: 60 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ name: macOS
on:
push:
branches:
- main
- releasebranch_*
- priotestci
pull_request:
branches:
- priotestci
env:
CACHE_NUMBER: 0
concurrency:
Expand Down Expand Up @@ -104,6 +105,22 @@ jobs:
@.github/workflows/pytest_args_parallel.txt \
--junitxml=pytest.xdist.junit.xml \
-k 'not testsuite'

- name: Log parallel test list
if: always()
shell: micromamba-shell {0}
run: |
PYTHONPATH="$(grass --config python_path):${PYTHONPATH}"
LD_LIBRARY_PATH="$(grass --config path)/lib:${LD_LIBRARY_PATH}"
export PYTHONPATH LD_LIBRARY_PATH
pytest --collect-only -q \
@.github/workflows/pytest_args_parallel.txt \
-k 'not testsuite' 2>/dev/null \
| grep -E '\.py::' | sort > /tmp/original_parallel_tests.txt
echo "Parallel tests: $(wc -l < /tmp/original_parallel_tests.txt)"
mkdir -p artifacts/original
cp /tmp/original_parallel_tests.txt artifacts/original/

- name: Run pytest with a single worker (for tests marked with needs_solo_run)
shell: micromamba-shell {0}
run: |
Expand All @@ -116,6 +133,7 @@ jobs:
@.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)
shell: micromamba-shell {0}
run: |
Expand All @@ -126,6 +144,21 @@ jobs:
pytest \
@.github/workflows/pytest_args_gunittest.txt \
--junitxml=pytest.gunittest.junit.xml

- name: Log gunittest test list
if: always()
shell: micromamba-shell {0}
run: |
PYTHONPATH="$(grass --config python_path):${PYTHONPATH}"
LD_LIBRARY_PATH="$(grass --config path)/lib:${LD_LIBRARY_PATH}"
export PYTHONPATH LD_LIBRARY_PATH
pytest --collect-only -q \
@.github/workflows/pytest_args_gunittest.txt \
2>/dev/null \
| grep -E '\.py::' | sort > /tmp/original_gunittest_tests.txt
echo "Gunittest tests: $(wc -l < /tmp/original_gunittest_tests.txt)"
mkdir -p artifacts/original
cp /tmp/original_gunittest_tests.txt artifacts/original/

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
Expand Down Expand Up @@ -166,6 +199,31 @@ jobs:
SAMPLE_DATA_URL: "file://${{ github.workspace }}/sample-data/\
nc_spm_full_v2alpha2.tar.gz"

- name: Log thorough test list
if: always()
shell: micromamba-shell {0}
run: |
mkdir -p artifacts/original

# Capture what test_thorough.sh actually executed (from testreport keyvalue files)
find . -path "./testreport/*/test_keyvalue_result.txt" -type f \
| while IFS= read -r kv; do
file="$(grep -E '^file=' "$kv" | head -n 1 | cut -d= -f2- || true)"
if [[ -n "${file}" ]]; then
echo "${file}" | sed 's|^\./||'
fi
done | sort -u > artifacts/original/original_thorough_executed.txt

echo "Actually executed: $(wc -l < artifacts/original/original_thorough_executed.txt)"

- name: Upload original test lists
if: always()
uses: actions/upload-artifact@v4
with:
name: original_test_lists
path: artifacts/original/
retention-days: 7

- name: Make HTML test report available
if: ${{ !cancelled() }}
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
Expand Down
Loading