-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (31 loc) · 1007 Bytes
/
check.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
name: Check style + docs + types
on:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- name: Install package with development dependencies
run: pip install -e ".[dev]"
# check with ruff
- name: Run ruff
run: ruff check
# check docs build
- name: Check that documentation builds with no errors or warnings
run: sphinx-build docs docs/_build --fail-on-warning
# check types with mypy
- name: Check types in python src directory; install needed types
run: mypy --install-types --non-interactive src
# use treon to make sure that example notebooks run
- name: Check jupyter notebooks with treon
run: treon