Skip to content

Bump codecov/codecov-action from 5.1.2 to 5.3.1 #184

Bump codecov/codecov-action from 5.1.2 to 5.3.1

Bump codecov/codecov-action from 5.1.2 to 5.3.1 #184

Workflow file for this run

name: Unit Tests
on:
pull_request:
paths:
- src/**
- tests/**
- pyproject.toml
- requirements-dev.txt
- '.github/workflows/unit_tests.yml'
push:
branches:
- main
jobs:
pytest:
name: pytest
runs-on: ${{matrix.os}}
strategy:
matrix:
python-version: ['3.12', '3.13']
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: False
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
pyproject.toml
- name: Install dependencies
run: |
python -W ignore -m pip install --upgrade pip
python -W ignore -m pip install -r requirements-dev.txt
python -W ignore -m pip install pytest-randomly
- name: Test with pytest
run: |
pytest --cov -v --junit-xml=.test_junit.xml
- name: Test Summary
id: test_summary
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
if: always() # always run, even if tests fail
with:
paths: |
.test_junit.xml
- name: Submit coverage
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
with:
env_vars: OS,PYTHON
name: ${{ matrix.os }}-${{ matrix.python-version }}
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
uses: codecov/test-results-action@9739113ad922ea0a9abb4b2c0f8bf6a4aa8ef820 # v1.0.1
if: ${{ !cancelled() }}
with:
files: .test_junit.xml
token: ${{ secrets.CODECOV_TOKEN }}