-
-
Notifications
You must be signed in to change notification settings - Fork 185
44 lines (34 loc) · 1.36 KB
/
changes.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
40
41
42
43
44
name: changes
on:
push:
branches: [ main ]
pull_request:
jobs:
changes:
name: Detect files changed
runs-on: ubuntu-latest
permissions:
pull-requests: read
# # this is for job-level control
# outputs:
# npm-test: ${{ steps.filter.outputs.should-run-npm-test }}
# pytest: ${{ steps.filter.outputs.should-run-pytest }}
# darker: ${{ steps.filter.outputs.should-run-darker }}
# new-unknown-files: ${{ steps.filter.outputs.new-files-at-root-level }}
steps:
- name: Checkout source code (merge ref)
uses: actions/checkout@v4
- id: filter
name: Detect files changed
uses: dorny/paths-filter@v3
with:
filters: .github/filters.yml
# echoing (for testing purposes)
- if: ${{ steps.filter.outputs.should-run-npm-test == 'true' }}
run: echo 'frontend files changed; should run npm-test.yml'
- if: ${{ steps.filter.outputs.should-run-pytest == 'true' }}
run: echo 'backend files changed; should run pytest.yml'
- if: ${{ steps.filter.outputs.should-run-darker == 'true' }}
run: echo 'python files changed; should run darker.yml'
- if: ${{ steps.filter.outputs.new-files-at-root-level == 'true' }}
run: echo 'unlisted files changed; will likely run pytest and npm-test'