Skip to content

Add: Functional workflow if you really like it 🤷 #5

Add: Functional workflow if you really like it 🤷

Add: Functional workflow if you really like it 🤷 #5

Workflow file for this run

name: Tests and static analysis
on:
push:
branches: [ main ]
env:
PYTHON_VERSION: "3.12"
POETRY_VERSION: "1.7.1"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache Poetry cache
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry
key: poetry-cache-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ env.POETRY_VERSION }}
- name: Cache Packages
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/*.yml') }}
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip poetry==${{ env.POETRY_VERSION }}
poetry install
- name: Lint
run: poetry run ruff check
- name: Check formatting
run: poetry run ruff format --check
- name: Run tests
run: poetry run pytest
- name: Check types
run: poetry run pyright
- name: Lint imports
run: poetry run lint-imports