test_accuracy #1503
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_accuracy | |
| permissions: {} # No permissions by default on workflow level | |
| on: | |
| pull_request: | |
| merge_group: | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| test_accuracy_items: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - "ubuntu-24.04" | |
| - "windows-2022" | |
| python-version: | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2 | |
| with: | |
| enable-cache: false | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| uv sync --locked --extra tests --extra-index-url https://download.pytorch.org/whl/cpu | |
| - name: Prepare test data | |
| run: | | |
| uv run python tests/accuracy/download_models.py -d data -j tests/accuracy/public_scope.json -l | |
| - name: Run Python Test | |
| run: | | |
| uv run pytest --data=./data tests/accuracy/test_accuracy.py | |
| test_accuracy: | |
| runs-on: ubuntu-latest | |
| needs: test_accuracy_items | |
| if: always() | |
| steps: | |
| - name: All tests ok | |
| if: ${{ !(contains(needs.*.result, 'failure')) }} | |
| run: exit 0 | |
| - name: Some tests failed | |
| if: ${{ contains(needs.*.result, 'failure') }} | |
| run: exit 1 |