Skip to content

Bump pytest-cov from 5.0.0 to 6.0.0 #5236

Bump pytest-cov from 5.0.0 to 6.0.0

Bump pytest-cov from 5.0.0 to 6.0.0 #5236

Workflow file for this run

---
name: Windows CI
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# * is a special character in YAML so you have to quote this string
# Run at 1:00 every day
- cron: 0 1 * * *
workflow_dispatch: {}
jobs:
build:
strategy:
matrix:
python-version: ['3.12']
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
# See https://github.com/codecov/codecov-action/issues/190.
fetch-depth: 2
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set secrets file
run: |
cp ./vuforia_secrets.env.example ./vuforia_secrets.env
- name: Run tests
run: |
# We use pytest-xdist to make this run much faster.
# The downside is that we cannot use -s / --capture=no.
uv run --extra=dev pytest --skip-real -vvv --exitfirst -n auto --cov=src/ --cov=tests/ --cov-report=xml .
env:
UV_PYTHON: ${{ matrix.python-version }}
- name: Show coverage file
run: |
# Sometimes we have been sure that we have 100% coverage, but codecov
# says otherwise.
#
# We show the coverage file here to help with debugging.
# https://github.com/VWS-Python/vws-python-mock/issues/708
cat ./coverage.xml
# We run this job on every PR, on every merge to main, and nightly.
# This causes us to hit an issue with Codecov.
#
# We see "Too many uploads to this commit.".
# See https://community.codecov.io/t/too-many-uploads-to-this-commit/2574.
#
# To work around this, we do not upload coverage data on scheduled runs.
# We print the event name here to help with debugging.
- name: Show event name
run: |
echo ${{ github.event_name }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
# See https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
# which tells us to use the token to avoid errors.
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}