Files
kornia--kornia/.github/actions/coverage/action.yml
T
wehub-resource-sync 3a2c66702c
Tests on CPU (scheduled) / check-skip (push) Has been cancelled
Tests on CPU (scheduled) / pre-tests (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-ubuntu (float32) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-ubuntu (float64) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-windows (3.11, float32, 2.5.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-windows (3.11, float32, 2.9.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-windows (3.11, float64, 2.5.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-windows (3.11, float64, 2.9.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-windows (3.12, float32, 2.5.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-windows (3.12, float32, 2.9.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-windows (3.12, float64, 2.5.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-windows (3.12, float64, 2.9.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-windows (3.13, float32, 2.9.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-windows (3.13, float64, 2.9.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-mac (3.11, float32, 2.5.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-mac (3.11, float32, 2.9.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-mac (3.12, float32, 2.5.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-mac (3.12, float32, 2.9.1) (push) Has been cancelled
Tests on CPU (scheduled) / tests-cpu-mac (3.13, float32, 2.9.1) (push) Has been cancelled
Tests on CPU (scheduled) / coverage (push) Has been cancelled
Tests on CPU (scheduled) / typing (push) Has been cancelled
Tests on CPU (scheduled) / tutorials (push) Has been cancelled
Tests on CPU (scheduled) / docs (push) Has been cancelled
Lint / TOML Format (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:49:27 +08:00

63 lines
1.9 KiB
YAML

name: tests-coverage
description: "Run CPU tests with coverage collection and artifact upload"
inputs:
python-version:
description: "Python version to use"
required: false
default: "3.11"
pytorch-dtype:
description: "PyTorch data type for testing"
required: false
default: float32
pytorch-device:
description: "PyTorch device for testing"
required: false
default: cpu
pytest-extra:
description: "Extra pytest arguments"
required: false
default: --timeout=30 -k "not test_dynamo"
coverage-artifact:
description: "Name of coverage artifact"
required: false
default: coverage
continue-on-error:
description: "Whether to continue on error"
required: false
default: "false"
runs:
using: "composite"
steps:
- name: Set pixi environment name
id: pixi-env
shell: bash
run: echo "name=py$(echo '${{ inputs.python-version }}' | tr -d '.')" >> $GITHUB_OUTPUT
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.40.0
cache: true
environments: ${{ steps.pixi-env.outputs.name }}
- name: Install dependencies
shell: bash
run: pixi run -e ${{ steps.pixi-env.outputs.name }} install
- name: Run CPU tests coverage ${{ inputs.pytorch-dtype }}
continue-on-error: ${{ inputs.continue-on-error == 'true' }}
shell: bash
run: |
pixi run -e ${{ steps.pixi-env.outputs.name }} uv run coverage erase
pixi run -e ${{ steps.pixi-env.outputs.name }} uv run coverage run --data-file=${{ inputs.coverage-artifact }} -m pytest -v ./tests/ --device=${{ inputs.pytorch-device }} --dtype=${{ inputs.pytorch-dtype }} ${{ inputs.pytest-extra }}
- name: Upload coverage results
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.coverage-artifact }}
path: ${{ inputs.coverage-artifact }}
if-no-files-found: error
retention-days: 1