Group dependabot updates #388
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: build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-in-project: true | |
virtualenvs-path: .venv | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: 'poetry' | |
- name: Cache pre-commit | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Cache mypy | |
uses: actions/cache@v4 | |
with: | |
path: .mypy_cache/ | |
key: mypy_cache-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root --with dev | |
- name: pre-commit | |
run: | | |
poetry run pre-commit run -a | |
- name: Mypy | |
run: | | |
poetry run mypy --incremental --no-install-types --show-error-codes --pretty src tests | |
- name: Tests | |
run: | | |
poetry run coverage run -m pytest --cov-config=.coveragerc | |
- name: Tests coverage | |
run: | | |
poetry run coverage html | |
poetry run coverage xml | |
poetry run coverage report --show-missing | |
# Requires CODECOV_TOKEN in repository secrets | |
- name: Upload codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # Only required for private repositories | |
file: ./coverage.xml | |
fail_ci_if_error: true |