Skip to content

fix coverage tests tag #9

fix coverage tests tag

fix coverage tests tag #9

Workflow file for this run

on:
workflow_call:
inputs:
python-version:
required: false
type: string
default: '["3.11"]'
pytorch-version:
required: false
type: string
default: '["2.1.2"]'
os:
required: false
type: string
default: ubuntu-latest
coverage-artifact:
required: false
type: string
default: 'coverage'
jobs:
tests-coverage-slow:
# Only run tests with slow marker which aren't dynamo tests
strategy:
fail-fast: true
matrix:
pytorch-dtype: ['float32', 'float64']
uses: kornia/workflows/./.github/workflows/[email protected]

Check failure on line 28 in .github/workflows/coverage.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/coverage.yml

Invalid workflow file

invalid value workflow reference: references to workflows must be prefixed with format 'owner/repository/' or './' for local workflows
with:
os: ${{ inputs.os }}
python-version: ${{ inputs.python-version }}
pytorch-version: ${{ inputs.pytorch-version }}
pytorch-dtype: ${{ matrix.pytorch-dtype }}
coverage: true
pytest-extra: '--runslow -k "slow and not test_dynamo"'
coverage-artifact: coverage-slow-${{ matrix.pytorch-dtype }}
tests-coverage-dynamo:
# Run all dynamo (torch.compile) related tests
uses: kornia/workflows/.github/workflwos/[email protected]
with:
os: ${{ inputs.os }}
python-version: ${{ inputs.python-version }}
pytorch-version: ${{ inputs.pytorch-version }}
pytorch-dtype: 'float32'
coverage: true
pytest-extra: '--runslow -k "test_dynamo"'
coverage-artifact: coverage-dynamo-float32
tests-coverage:
# Run all tests which didn't have a slow marker or are dynamo tests
uses: kornia/workflows/./.github/workflows/[email protected]
with:
os: ${{ inputs.os }}
python-version: ${{ inputs.python-version }}
pytorch-version: ${{ inputs.pytorch-version }}
pytorch-dtype: 'float32,float64'
coverage: true
coverage-artifact: coverage-without-slow-and-dynamo
report-coverage:
runs-on: ${{ inputs.os }}
needs: [tests-slow, tests-coverage-dynamo, tests-coverage]
steps:
- name: Checkout kornia
uses: actions/checkout@v3
- name: Download coverage reports
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
- name: Install dev dependencies
shell: bash
run: pip install -r ./requirements/requirements-dev.txt
- name: Run coverage
run: |
coverage combine --keep \
$GITHUB_WORKSPACE/coverage-dynamo-float32 \
$GITHUB_WORKSPACE/coverage-slow-float32 \
$GITHUB_WORKSPACE/coverage-slow-float64 \
$GITHUB_WORKSPACE/coverage-without-slow-and-dynamo
coverage xml -o coverage.xml # Generate the xml
coverage report
- if: always()
name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }} # to not depend on build via GH API
# flags: cpu,Ubuntu-latest_py-3.11_pt-2.1.2_float32,float64
flags: cpu,${{ inputs.os }}_py-${{ inputs.python-version }}_pt-${{ inputs.pytorch-version }}_float32,float64
name: cpu-coverage