update docs and code to match new rule (#51) #36
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: Dev | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
dev: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1.4.1 | |
with: | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: venv-dev-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root --with docs | |
- name: Activate virtual environment | |
run: source $VENV | |
- name: Lint with Ruff | |
run: poetry run poe ruff | |
- name: Check code security with Bandit | |
run: poetry run poe bandit | |
- name: Typing with mypy | |
run: poetry run poe mypy | |
- name: Format with Ruff | |
run: poetry run poe format-check | |
- name: Build docs with Material for MkDocs | |
run: poetry run poe docs-build |