build(deps): bump github/codeql-action/init from 3.37.9 to 4.38.2 #303
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: Tests | |
| on: | |
| push: | |
| branches: [main, stable] | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| # Daily at 02:00 UTC (10:00 China Standard Time), on the default branch. | |
| - cron: "0 2 * * *" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: tests-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| pytest: | |
| name: pytest (${{ matrix.suite }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ fromJSON((github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && '[{"suite":"full","selection":""}]' || '[{"suite":"fast","selection":"not slow and not integration and not numba"},{"suite":"numba","selection":"not integration and (slow or numba)"}]') }} | |
| steps: | |
| - name: Resolve numba cache dir | |
| run: | | |
| # Redirect all Numba disk caches (manager fused kernels and term | |
| # specializations) to a single path so they can be cached between | |
| # runs. Kernel plan keys are content hashes, so stale cache entries | |
| # are simply unused and never produce wrong results. | |
| # Numba does not expand "~" in NUMBA_CACHE_DIR, so resolve the path | |
| # via $HOME here; the cache action below reads the same variable. | |
| echo "NUMBA_CACHE_DIR=$HOME/.cache/motrixlab/numba-manager" >> "$GITHUB_ENV" | |
| - name: Restore numba kernel cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/motrixlab | |
| key: numba-kernel-${{ runner.os }}-${{ matrix.suite }}-${{ github.sha }} | |
| restore-keys: | | |
| numba-kernel-${{ runner.os }}-${{ matrix.suite }}- | |
| numba-kernel-${{ runner.os }}- | |
| - name: Checkout repository | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| with: | |
| lfs: true | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 | |
| with: | |
| version: "0.9.14" | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install 3.10 | |
| - name: Install workspace and test dependencies | |
| run: sh install.sh --all | |
| - name: Run tests | |
| env: | |
| PYTEST_SELECTION: ${{ matrix.selection }} | |
| run: | | |
| .venv/bin/python -m pytest -q --strict-markers --disable-warnings \ | |
| --durations=20 --junitxml=test-results/${{ matrix.suite }}.xml \ | |
| -m "$PYTEST_SELECTION" | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pytest-${{ matrix.suite }} | |
| path: test-results/ | |
| if-no-files-found: warn |