Skip to content

Commit 89d3f0d

Browse files
authored
Split the linting in the CI into multiple jobs (#6)
* Reference tutorials with glob instead of specific paths * Split each linter into it's own job
1 parent dccc029 commit 89d3f0d

2 files changed

Lines changed: 53 additions & 13 deletions

File tree

.github/workflows/static_analysis.yml

Lines changed: 51 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ on:
1010
- main
1111
- devel
1212

13+
defaults:
14+
run:
15+
shell: bash
16+
1317
jobs:
14-
static-analysis:
18+
cloc:
1519
runs-on: ubuntu-latest
1620
steps:
1721
- name: Checkout the code
@@ -24,39 +28,74 @@ jobs:
2428
./cloc --version
2529
./cloc $(git ls-files)
2630
31+
black:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout the code
35+
uses: actions/checkout@v4
36+
2737
- name: Code formatting with black
2838
run: |
29-
pip install black
30-
pip install "black[jupyter]"
39+
pip install black "black[jupyter]"
3140
black --check src/
3241
black --check tutorials/
3342
43+
isort:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Checkout the code
47+
uses: actions/checkout@v4
48+
3449
- name: Code formatting with isort
3550
run: |
3651
pip install isort
3752
isort --check src/
3853
isort --check tutorials/
3954
40-
- name: Code formatting with mypy
41-
continue-on-error: true
55+
mypy:
56+
runs-on: ubuntu-latest
57+
continue-on-error: true
58+
steps:
59+
- name: Checkout the code
60+
uses: actions/checkout@v4
61+
62+
- name: Type checking with mypy
4263
run: |
4364
pip install mypy
4465
mypy src/
4566
46-
- name: Code formatting with prospector
47-
continue-on-error: true
67+
prospector:
68+
runs-on: ubuntu-latest
69+
continue-on-error: true
70+
steps:
71+
- name: Checkout the code
72+
uses: actions/checkout@v4
73+
74+
- name: Code analysis with prospector
4875
run: |
4976
pip install prospector
5077
prospector src/
51-
52-
- name: Code formatting with ruff
53-
continue-on-error: true
78+
79+
ruff:
80+
runs-on: ubuntu-latest
81+
continue-on-error: true
82+
steps:
83+
- name: Checkout the code
84+
uses: actions/checkout@v4
85+
86+
- name: Linting with ruff
5487
run: |
5588
pip install ruff
5689
ruff check src/
5790
58-
- name: Code formatting with pylint
59-
continue-on-error: true
91+
pylint:
92+
runs-on: ubuntu-latest
93+
continue-on-error: true
94+
steps:
95+
- name: Checkout the code
96+
uses: actions/checkout@v4
97+
98+
- name: Linting with pylint
6099
run: |
61100
pip install pylint
62101
pylint src/

docs/source/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ documentation for details.
1414
.. toctree::
1515
:maxdepth: 2
1616
:caption: Tutorials:
17+
:glob:
1718

18-
tutorials/tutorial_01
19+
tutorials/*

0 commit comments

Comments
 (0)