run pre-commit checks in tests action #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow runs tests using pytest. | |
name: Run pytest | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: [3.12] | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install pdm | |
run: pip install pdm | |
- name: pre-commit checks | |
uses: pre-commit/[email protected] | |
- name: Run tests | |
run: pdm run pytest tests --cov=src/enzax | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 |