Test performance improvements #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install mise | |
| uses: jdx/mise-action@v2 | |
| - name: Install Python dependencies | |
| run: uv sync | |
| - name: Run ruff linter | |
| run: uv run ruff check | |
| - name: Run ruff formatter check | |
| run: uv run ruff format --check | |
| - name: Restore test hydrology data cache | |
| id: cache-restore | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: .test_cache | |
| key: test-hydrology-data-v2 | |
| - name: Run tests | |
| run: uv run pytest -n auto | |
| - name: Save test hydrology data cache | |
| if: steps.cache-restore.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: .test_cache | |
| key: test-hydrology-data-v2 |