@@ -22,94 +22,38 @@ jobs:
2222 python-files:
2323 - '**.py,**.pyi,**.ipynb'
2424
25- databooks :
26- name : Databooks
25+ formatter :
26+ name : Formatter
2727 needs : changes
28- if : needs.changes.outputs.python-files == 'true'
2928 runs-on : ubuntu-latest
3029 steps :
3130 - name : Checkout Code
3231 uses : actions/checkout@v3
3332
34- - name : Install Python Modules
35- uses : ./.github/actions/install-python-modules
36-
37- - name : Run Databooks
38- run : poetry run databooks meta --no-rm-outs --rm-exec --yes .
39-
40- prettier :
41- name : Prettier
42- runs-on : ubuntu-latest
43- steps :
44- - name : Checkout Code
45- uses : actions/checkout@v3
46-
47- - name : Install npm Mudules
33+ - name : Install npm Modules
4834 uses : ./.github/actions/install-npm-modules
4935
50- - name : Run Prettier
51- run : npx prettier --write .
52-
53- black :
54- name : Black
55- needs : databooks
56- if : needs.changes.outputs.python-files == 'true'
57- runs-on : ubuntu-latest
58- steps :
59- - name : Checkout Code
60- uses : actions/checkout@v3
61-
6236 - name : Install Python Modules
6337 uses : ./.github/actions/install-python-modules
6438
65- - name : Run Black
66- run : poetry run black .
67-
68- nbqa-isort :
69- name : nqQA-isort
70- needs : black
71- if : needs.changes.outputs.python-files == 'true'
72- runs-on : ubuntu-latest
73- steps :
74- - name : Checkout Code
75- uses : actions/checkout@v3
39+ - name : Run Prettier
40+ run : npx prettier --write .
7641
77- - name : Install Python Modules
78- uses : ./.github/actions/install-python-modules
42+ - name : Run Databooks
43+ if : needs.changes.outputs.python-files == 'true'
44+ run : poetry run databooks meta --rm-outs --rm-exec --yes .
7945
8046 - name : Run nqQA isort
47+ if : needs.changes.outputs.python-files == 'true'
8148 run : poetry run nbqa isort .
8249
83- nbqa-pyupgrade :
84- name : nqQA-pyupgrade
85- needs : black
86- if : needs.changes.outputs.python-files == 'true'
87- runs-on : ubuntu-latest
88- steps :
89- - name : Checkout Code
90- uses : actions/checkout@v3
91-
92- - name : Install Python Modules
93- uses : ./.github/actions/install-python-modules
94-
9550 - name : Run nqQA pyupgrade
51+ if : needs.changes.outputs.python-files == 'true'
9652 run : poetry run nbqa pyupgrade .
9753
98- pre-commit :
99- name : pre-commit
100- needs : black
101- runs-on : ubuntu-latest
102- steps :
103- - name : Checkout Code
104- uses : actions/checkout@v3
105-
106- - name : Setup Python
107- uses : actions/setup-python@v4
108- with :
109- python-version : latest
110-
111- - name : Install Python Modules
112- uses : ./.github/actions/install-python-modules
54+ - name : Run Black
55+ if : needs.changes.outputs.python-files == 'true'
56+ run : poetry run black .
11357
11458 - name : Cache pre-commit
11559 uses : actions/cache@v3
@@ -118,18 +62,10 @@ jobs:
11862 path : ~/.cache/pre-commit
11963 key : pre-commit-cache-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('.pre-commit-config.yaml') }}
12064
121- - name : Install pre-commit environment
122- if : steps.precommit_cache_id.outputs.cache-hit != 'true'
123- run : pre-commit run --all-files
124-
12565 - name : Run pre-commit
126- run : pre-commit run --all-files
66+ if : steps.precommit_cache_id.outputs.cache-hit != 'true'
67+ run : poetry run pre-commit run --all-files
12768
128- commit :
129- name : Commit
130- needs : prettier
131- runs-on : ubuntu-latest
132- steps :
13369 - name : Commit
13470 uses : stefanzweifel/git-auto-commit-action@v4
13571 with :
0 commit comments