-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (47 loc) · 1.36 KB
/
dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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