Add pre-commit #250
Workflow file for this run
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
name: test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
test: | |
name: Test | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Poetry | |
run: pipx install poetry | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update submodules | |
run: git submodule update --init --remote | |
- name: Update PATH | |
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Configure Poetry | |
run: poetry config virtualenvs.in-project true | |
- name: Install dependencies | |
run: poetry install --with test --all-extras | |
- name: Run tests | |
run: poetry run pytest --cov-report xml | |
- name: Upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
files: "./coverage.xml" |