Skip to content

[pre-commit.ci] pre-commit autoupdate #1681

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #1681

Workflow file for this run

name: Test package
permissions:
contents: read
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install requirements
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r requirements-test.txt
- name: Run pre-commit
run: |
pre-commit run --all-files --show-diff-on-failure --verbose
- name: Run tests
shell: bash
run: |
coverage run --append --source=benedict -m unittest
coverage report --show-missing
coverage xml -o ./coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
files: ./coverage.xml
flags: unittests
verbose: true