[pre-commit.ci] pre-commit autoupdate #247
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
tox: | |
name: ${{ matrix.toxenv }} | |
runs-on: ubuntu-latest | |
env: | |
TOXENV: ${{ matrix.toxenv }} | |
strategy: | |
fail-fast: false | |
matrix: | |
toxenv: | |
- py312,test-coverage | |
- lint | |
- mypy | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Generate the cache suffix | |
id: cache-suffix | |
run: | | |
echo cache-suffix=${TOXENV//,/-} >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pip | |
~/.cache/pre-commit | |
.mypy_cache | |
key: ${{ runner.os }}-pip-${{ steps.cache-suffix.outputs.cache-suffix }} | |
- name: Install dependencies | |
run: | | |
set -xe | |
python -VV | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install --upgrade virtualenv tox | |
- name: tox | |
run: python -m tox | |
pip-compile: | |
name: pip-compile | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-compile | |
- name: Install dependencies | |
run: | | |
set -xe | |
python -VV | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install --upgrade virtualenv tox | |
- name: tox | |
# Verify requirements.txt is up to date | |
run: python -m tox -e pip-compile && git diff --exit-code |