Repository navigation
[Kumo-Anomaly 2/n] Add KumoAnomaly reconstruction and scoring
#7832
Workflow file for this run
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: Test | |
| on: # yamllint disable-line rule:truthy | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line | |
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| pytest: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.11', '3.15'] | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| activate-environment: true | |
| - name: Install package | |
| run: | | |
| # `-e` for coverage report. | |
| uv pip install \ | |
| --torch-backend=cpu \ | |
| --find-links=https://data.pyg.org/whl/torch-2.14.0+cpu.html \ | |
| --group=test-cpu \ | |
| -e . | |
| - name: Run tests | |
| env: | |
| FULL_TEST: ${{ ((github.event_name == 'push' && github.ref_name == 'main') || contains(github.event.pull_request.labels.*.name, 'ci-full-test')) && '1' || '0' }} | |
| run: | | |
| pytest --cov=sdm --cov-config=pyproject.toml --cov-report=term-missing --durations=10 --junitxml=junit.xml | |
| - name: Upload coverage | |
| if: ${{ runner.os == 'Linux' }} | |
| uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| report_type: test_results |