Repository navigation
48 lines (44 loc) · 1.35 KB
/
Copy pathci.yml
File metadata and controls
48 lines (44 loc) · 1.35 KB
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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
# Same pin as the dev extra: formatting rules must not depend on
# which ruff a machine happens to have.
- run: pip install ruff==0.16.3
# examples/ is linted too: the paper example is a shipped deliverable
# people read and copy, not a scratch script.
- run: ruff check src tests examples
- run: ruff format --check src tests examples
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# web extra included so the FastAPI app's tests run in CI rather
# than being importorskip'd away -- the web app is a headline
# feature and deserves gate coverage.
- run: pip install -e .[dev,web]
- run: pytest --cov=heliostat --cov-report=term
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -e .[docs]
- run: mkdocs build --strict