-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (41 loc) · 1.38 KB
/
ci.yaml
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
name: test
on: [push]
jobs:
test:
env:
POETRY_VERSION: "1.7.1"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Load cached Poetry installation
uses: actions/cache@v4
with:
path: ~/.local
key: ${{ runner.os }}-dotlocal-dir-py${{matrix.python-version }}-poetry${{ env.POETRY_VERSION }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies with poetry
run: poetry install
- name: Install PlantUML
run: sudo apt-get install plantuml
- name: Lint with ruff
run: |
# Stop the build if there are Python syntax errors or undefined names
poetry run ruff check --output-format github --select=E9,F63,F7,F82 --target-version=py310 .
# Default set of ruff rules with GitHub Annotations
poetry run ruff check --output-format github --target-version=py310 .
- name: Static type checking with mypy
run: |
poetry run mypy sphinxcontrib
- name: Build docs
run: |
poetry run sphinx-build docs docs/_build