@@ -74,91 +74,100 @@ jobs:
7474 docker run --network="host" -v .:/app cypress/base:22.18.0 \
7575 bash "-c" "cd /app && npx cypress install && yarn run test-e2e"
7676
77+ changes :
78+ runs-on : ubuntu-latest
79+ permissions :
80+ pull-requests : read
81+ outputs :
82+ py : ${{ steps.filter.outputs.py }}
83+ js : ${{ steps.filter.outputs.js }}
84+ scss : ${{ steps.filter.outputs.scss }}
85+ steps :
86+ - uses : dorny/paths-filter@v3
87+ id : filter
88+ with :
89+ filters : |
90+ py:
91+ - '**/*.py'
92+ - 'requirements.txt'
93+ - 'templates/**/*'
94+ js:
95+ - '**/*.js'
96+ - '**/*.ts'
97+ - '**/*.jsx'
98+ - '**/*.tsx'
99+ - 'package.json'
100+ - 'yarn.lock'
101+ - 'eslint.config.mjs'
102+ - 'vitest.config.js'
103+ - 'vite.config.js'
104+ - 'tsconfig.json'
105+ - 'babel.config.json'
106+ scss:
107+ - '**/*.scss'
108+ - '.stylelintrc'
109+ - 'package.json'
110+ - 'yarn.lock'
111+
77112 lint-python :
113+ needs : changes
114+ if : ${{ needs.changes.outputs.py == 'true' }}
78115 runs-on : ubuntu-latest
79116 permissions :
80117 contents : read
81118 steps :
82119 - name : Checkout
83120 uses : actions/checkout@v6
84- - uses : dorny/paths-filter@v3
85- id : filter
86- with :
87- filters : |
88- py:
89- - '**/*.py'
90121
91122 - name : Install dotrun
92- if : ${{ steps.filter.outputs.py == 'true' }}
93123 run : sudo pip3 install dotrun
94124
95125 - name : Install dependencies
96- if : ${{ steps.filter.outputs.py == 'true' }}
97126 run : |
98127 sudo chmod -R 777 .
99128 dotrun install
100129
101130 - name : Build assets
102- if : ${{ steps.filter.outputs.py == 'true' }}
103131 run : dotrun build
104132
105133 - name : Lint python
106- if : ${{ steps.filter.outputs.py == 'true' }}
107134 run : dotrun lint-python
108135
109136 lint-scss :
137+ needs : changes
138+ if : ${{ needs.changes.outputs.scss == 'true' }}
110139 runs-on : ubuntu-latest
111140 permissions :
112141 contents : read
113142 steps :
114143 - name : Checkout
115144 uses : actions/checkout@v6
116145
117- - uses : dorny/paths-filter@v3
118- id : filter
119- with :
120- filters : |
121- scss:
122- - '**/*.scss'
123-
124146 - name : Install SCSS dependencies
125- if : ${{ steps.filter.outputs.scss == 'true' }}
126147 run : yarn install --immutable
127148
128149 - name : Lint SCSS
129- if : ${{ steps.filter.outputs.scss == 'true' }}
130150 run : yarn lint-scss
131151
132152 lint-js :
153+ needs : changes
154+ if : ${{ needs.changes.outputs.js == 'true' }}
133155 runs-on : ubuntu-latest
134156 permissions :
135157 contents : read
136158 steps :
137159 - name : Checkout
138160 uses : actions/checkout@v6
139161
140- - uses : dorny/paths-filter@v3
141- id : filter
142- with :
143- filters : |
144- js:
145- - '**/*.js'
146- ts:
147- - '**/*.ts'
148- jsx:
149- - '**/*.jsx'
150- tsx:
151- - '**/*.tsx'
152-
153162 - name : Install JS dependencies
154- if : ${{ steps.filter.outputs.js == 'true' || steps.filter.outputs.ts == 'true' || steps.filter.outputs.jsx == 'true' || steps.filter.outputs.tsx == 'true' }}
155163 run : yarn install --immutable
156164
157165 - name : Lint JS
158- if : ${{ steps.filter.outputs.js == 'true' || steps.filter.outputs.ts == 'true' || steps.filter.outputs.jsx == 'true' || steps.filter.outputs.tsx == 'true' }}
159166 run : yarn lint-js
160167
161168 test-python :
169+ needs : changes
170+ if : ${{ needs.changes.outputs.py == 'true' }}
162171 runs-on : ubuntu-latest
163172 permissions :
164173 pull-requests : write
@@ -167,76 +176,49 @@ jobs:
167176 steps :
168177 - uses : actions/checkout@v6
169178
170- - uses : dorny/paths-filter@v3
171- id : filter
172- with :
173- filters : |
174- py:
175- - '**/*.py'
176-
177179 - name : Install dotrun
178- if : ${{ steps.filter.outputs.py == 'true' }}
179180 run : sudo pip3 install dotrun
180181
181182 - name : Install dependencies
182- if : ${{ steps.filter.outputs.py == 'true' }}
183183 run : |
184184 sudo chmod -R 777 .
185185 dotrun install
186186
187187 - name : Install dependencies
188- if : ${{ steps.filter.outputs.py == 'true' }}
189188 run : sudo pip3 install coverage
190189
191190 - name : Build resources
192- if : ${{ steps.filter.outputs.py == 'true' }}
193191 run : dotrun build
194192
195193 - name : Run python tests with coverage
196- if : ${{ steps.filter.outputs.py == 'true' }}
197194 run : dotrun test-python-job
198195
199196 - name : Upload coverage to Codecov
200- if : ${{ steps.filter.outputs.py == 'true' }}
201197 uses : codecov/codecov-action@v5
202198 with :
203199 flags : python
204200
205201 test-js :
202+ needs : changes
203+ if : ${{ needs.changes.outputs.js == 'true' }}
206204 runs-on : ubuntu-latest
207205 permissions :
208206 contents : read
209207 steps :
210208 - uses : actions/checkout@v6
211209
212- - uses : dorny/paths-filter@v3
213- id : filter
214- with :
215- filters : |
216- js:
217- - '**/*.js'
218- ts:
219- - '**/*.ts'
220- jsx:
221- - '**/*.jsx'
222- tsx:
223- - '**/*.tsx'
224-
225210 - uses : actions/setup-node@v6
226211 with :
227212 node-version : 24
228213
229214 - name : Install dependencies
230- if : ${{ steps.filter.outputs.js == 'true' || steps.filter.outputs.ts == 'true' || steps.filter.outputs.jsx == 'true' || steps.filter.outputs.tsx == 'true' }}
231215 run : yarn install --immutable
232216
233217 - name : Run JS tests with coverage
234- if : ${{ steps.filter.outputs.js == 'true' || steps.filter.outputs.ts == 'true' || steps.filter.outputs.jsx == 'true' || steps.filter.outputs.tsx == 'true' }}
235218 run : |
236219 yarn test-js --coverage
237220
238221 - name : Upload coverage to Codecov
239- if : ${{ steps.filter.outputs.js == 'true' || steps.filter.outputs.ts == 'true' || steps.filter.outputs.jsx == 'true' || steps.filter.outputs.tsx == 'true' }}
240222 uses : codecov/codecov-action@v5
241223 with :
242224 flags : javascript
0 commit comments