Bump peter-evans/create-pull-request from 6 to 7 #50
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 & Lint" | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allow manual triggering | |
workflow_dispatch: | |
jobs: | |
test-python: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout source code" | |
uses: actions/checkout@v4 | |
- name: "Install Python" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10.12" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 'latest' | |
- name: Load or Install Dependencies | |
uses: actions/cache@v4 | |
id: poetry-cache | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
continue-on-error: true # Ensures workflow runs even if cache retrieval fails | |
- name: Install dependencies if cache missed | |
if: steps.poetry-cache.outputs.cache-hit != 'true' | |
run: poetry install --no-root | |
- name: "Run ruff format" | |
run: poetry run ruff format | |
- name: "Run ruff check" | |
run: poetry run ruff check | |
- name: "Run mypy" | |
run: poetry run mypy . | |
- name: "Run tests" | |
run: poetry run pytest --cov=src --cov-report=html |