From 5d2e26cc85a017fff9ef70c347d5d0ec452895bb Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Thu, 3 Dec 2026 18:56:58 -0700 Subject: [PATCH] Run every tools test in CI, with the packages the place and elevation tests need CI picked tools tests by file name pattern, so test_place_trails.py and nineteen other files never ran there. A new workflow installs the place tool's requirements, numpy and Pillow, runs the place tests and then the whole of tools/tests. The Validate workflow still installs no packages. Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/tool-tests.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/tool-tests.yml diff --git a/.github/workflows/tool-tests.yml b/.github/workflows/tool-tests.yml new file mode 100644 index 0000000..a2166d9 --- /dev/null +++ b/.github/workflows/tool-tests.yml @@ -0,0 +1,26 @@ +name: Tool tests + +# Every test in tools/tests, with the packages some of them need. test_place_trails.py needs the +# place tool's requirements (without shapely it skips itself and still passes), and +# test_elevation.py needs numpy and Pillow. This is a workflow of its own because the Validate +# workflow installs no packages (tools/tests/test_audit_doc.py holds it to that). + +on: + push: + pull_request: + +jobs: + tools: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: pip + cache-dependency-path: tools/place_trails.requirements.txt + - run: pip install -r tools/place_trails.requirements.txt numpy Pillow + - run: python -m unittest discover tools/tests -p "test_place_trails.py" + # The whole directory, so that a new test file cannot be left out by a file name pattern. + - run: python -m unittest discover tools/tests