Remove gradle and switch to poetry #17
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 | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies if not in cached venv | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- name: Install project | |
run: poetry install --no-interaction | |
- name: "Source virtual environment" | |
run: | | |
source .venv/bin/activate | |
- name: "Run ruff format" | |
run: | | |
ruff format src/ tests/ | |
- name: "Run ruff check" | |
run: | | |
ruff check src/ tests/ | |
- name: "Run mypy" | |
run: | | |
mypy . | |
- name: "Run tests" | |
run: | | |
source .venv/bin/activate | |
pytest --cov=src --cov-report=html |