chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.8.0 #357
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: | |
env: | |
POETRY_VERSION: 1.3.2 | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache Poetry | |
id: cache-poetry | |
uses: actions/[email protected] | |
with: | |
path: ~/.poetry | |
key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: ${{ env.POETRY_VERSION }} | |
- name: Cache Dependencies | |
id: cache-deps | |
uses: actions/[email protected] | |
with: | |
path: ${{ github.workspace }}/.venv | |
key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cache-deps.cache-hit != 'true' | |
run: | | |
poetry config virtualenvs.in-project true | |
poetry install --no-interaction -E anyio | |
- name: Run tests | |
run: poetry run pytest -v | |
lint: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11"] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache Poetry | |
id: cache-poetry | |
uses: actions/[email protected] | |
with: | |
path: ~/.poetry | |
key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: ${{ env.POETRY_VERSION }} | |
- name: Cache Dependencies | |
id: cache-deps | |
uses: actions/[email protected] | |
with: | |
path: ${{ github.workspace }}/.venv | |
key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cache-deps.cache-hit != 'true' | |
run: | | |
poetry config virtualenvs.in-project true | |
poetry install --no-interaction -E anyio | |
- run: pip install pre-commit==3.0.4 | |
- run: pre-commit install-hooks | |
- run: pre-commit run -a |