Skip to content

Auto-update pre-commit hooks (#79) #166

Auto-update pre-commit hooks (#79)

Auto-update pre-commit hooks (#79) #166

Workflow file for this run

# Run tests on each push and pull request
name: Run tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install . .[test]
- name: Lint and test with pre-commit
run: pre-commit run --all-files
- name: Pytest and coverage
run: pytest tests --cov
- name: Turn coverage into xml
run: python -m coverage xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage.xml