Skip to content

Bump codecov/codecov-action from 4 to 5 (#51) #415

Bump codecov/codecov-action from 4 to 5 (#51)

Bump codecov/codecov-action from 4 to 5 (#51) #415

Workflow file for this run

name: CI testing
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
on: # Trigger the workflow on push or pull request, but only for the main branch
push: {}
pull_request:
branches: [main]
jobs:
pytester:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ["3.8", "3.11"]
# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
pip install -r tests/requirements.txt
pip list
shell: bash
- name: Tests
run: |
phmdoctest README.md --outfile tests/test_readme.py
python -m pytest . -v --cov=deprecate --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml
if: failure()
- name: Statistics
if: success()
run: |
coverage report
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: success()
continue-on-error: true
with:
# token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: pytest,python${{ matrix.python-version }}
fail_ci_if_error: false
testing-guardian:
runs-on: ubuntu-latest
needs: pytester
if: always()
steps:
- run: echo "${{ needs.pytester.result }}"
- name: failing...
if: needs.pytester.result == 'failure'
run: exit 1
- name: cancelled or skipped...
if: contains(fromJSON('["cancelled", "skipped"]'), needs.pytester.result)
timeout-minutes: 1
run: sleep 90