File tree 4 files changed +123
-2
lines changed 4 files changed +123
-2
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,39 @@ name: Deploy Documentation
2
2
3
3
on :
4
4
push :
5
+ branches :
6
+ - main
5
7
pull_request :
6
8
workflow_dispatch :
7
9
8
10
jobs :
11
+ changed-files :
12
+ name : Changed Files
13
+ runs-on : ubuntu-latest
14
+ outputs :
15
+ docs-change : ${{ steps.changed-files.outputs.docs-change_any_modified == 'true' }}
16
+
17
+ steps :
18
+ - name : Checkout repository
19
+ uses : actions/checkout@v4
20
+ with :
21
+ fetch-depth : 50 # Assume PRs are less than 50 commits
22
+
23
+ - name : Find changed files
24
+ uses : tj-actions/changed-files@v44
25
+ id : changed-files
26
+ with :
27
+ files_yaml : |
28
+ docs-change:
29
+ - .github/workflows/deploy-docs.yml
30
+ - docs/**
31
+ - package.json
32
+ - package-lock.json
33
+
9
34
vercel :
10
35
runs-on : ubuntu-latest
36
+ needs : [changed-files]
37
+ if : ${{ needs.changed-files.outputs.docs-change == 'true' }}
11
38
12
39
steps :
13
40
- name : Checkout Code
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ permissions:
10
10
11
11
jobs :
12
12
update_release_draft :
13
+ runs-on : ubuntu-latest
13
14
permissions :
14
15
contents : write
15
16
pull-requests : read
16
17
17
- runs-on : ubuntu-latest
18
18
steps :
19
19
# Drafts your next Release notes as Pull Requests are merged into "master"
20
20
- uses : release-drafter/release-drafter@v6
Original file line number Diff line number Diff line change 1
1
name : Linting
2
2
3
- on : [push, pull_request]
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
4
8
5
9
env :
6
10
PIP_DISABLE_PIP_VERSION_CHECK : 1
7
11
8
12
jobs :
13
+ changed-files :
14
+ name : Changed Files
15
+ runs-on : ubuntu-latest
16
+ outputs :
17
+ docs-change : ${{ steps.changed-files.outputs.docs-change_any_modified == 'true' }}
18
+ python-change : ${{ steps.changed-files.outputs.python-change_any_modified == 'true' }}
19
+ project-change : ${{ steps.changed-files.outputs.project-change_any_modified == 'true' }}
20
+
21
+ steps :
22
+ - name : Checkout repository
23
+ uses : actions/checkout@v4
24
+ with :
25
+ fetch-depth : 50 # Assume PRs are less than 50 commits
26
+
27
+ - name : Find changed files
28
+ uses : tj-actions/changed-files@v44
29
+ id : changed-files
30
+ with :
31
+ files_yaml : |
32
+ common: &common
33
+ - .github/workflows/linter.yml
34
+
35
+ docs-change:
36
+ - *common
37
+ - docs/**
38
+ - package.json
39
+ - package-lock.json
40
+
41
+ python-change:
42
+ - *common
43
+ - src/**
44
+ - tests/**
45
+ - ruff.toml
46
+ - poetry.lock
47
+ - pyproject.toml
48
+
49
+ project-change:
50
+ - *common
51
+ - package.json
52
+ - .prettierignore
53
+ - .github/ISSUE_TEMPLATE/**
54
+ - .github/*.md
55
+
9
56
lint-python :
10
57
name : Python
11
58
runs-on : ubuntu-latest
59
+ needs : [changed-files]
60
+ if : ${{ needs.changed-files.outputs.python-change == 'true' }}
12
61
13
62
steps :
14
63
- name : Checkout repository
33
82
lint-docs :
34
83
name : Docs
35
84
runs-on : ubuntu-latest
85
+ needs : [changed-files]
86
+ if : ${{ needs.changed-files.outputs.docs-change == 'true' }}
36
87
37
88
steps :
38
89
- name : Checkout repository
56
107
lint-project :
57
108
name : Project
58
109
runs-on : ubuntu-latest
110
+ needs : [changed-files]
111
+ if : ${{ needs.changed-files.outputs.project-change == 'true' }}
59
112
60
113
steps :
61
114
- name : Checkout repository
86
139
- name : Whether the whole linting suite passed
87
140
uses : re-actors/alls-green@v1.2.2
88
141
with :
142
+ allowed-skips : ${{ toJSON(needs) }}
89
143
jobs : ${{ toJSON(needs) }}
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ name: Run Test Suite
2
2
3
3
on :
4
4
push :
5
+ branches :
6
+ - main
5
7
pull_request :
6
8
workflow_dispatch :
7
9
@@ -21,9 +23,44 @@ concurrency:
21
23
group : ${{ github.workflow }}-${{ github.ref }}
22
24
23
25
jobs :
26
+ changed-files :
27
+ name : Changed Files
28
+ runs-on : ubuntu-latest
29
+ outputs :
30
+ docs-change : ${{ steps.changed-files.outputs.docs-change_any_modified == 'true' }}
31
+ python-change : ${{ steps.changed-files.outputs.python-change_any_modified == 'true' }}
32
+ project-change : ${{ steps.changed-files.outputs.project-change_any_modified == 'true' }}
33
+
34
+ steps :
35
+ - name : Checkout repository
36
+ uses : actions/checkout@v4
37
+ with :
38
+ fetch-depth : 50 # Assume PRs are less than 50 commits
39
+
40
+ - name : Find changed files
41
+ uses : tj-actions/changed-files@v44
42
+ id : changed-files
43
+ with :
44
+ files_yaml : |
45
+ common: &common
46
+ - .github/workflows/test-worker.yml
47
+
48
+ docs-change:
49
+ - *common
50
+ - docs/**
51
+ - package.json
52
+ - package-lock.json
53
+
54
+ python-change:
55
+ - *common
56
+ - src/**
57
+ - tests/**
58
+
24
59
test-python :
25
60
name : " ${{ matrix.python-version }} on ${{ matrix.os }}"
26
61
runs-on : " ${{ matrix.os }}-latest"
62
+ needs : [changed-files]
63
+ if : ${{ needs.changed-files.outputs.python-change == 'true' }}
27
64
28
65
continue-on-error : ${{ startsWith(matrix.python-version, '~') }} # Allows unstable Python versions to fail
29
66
59
96
test-docs :
60
97
name : Docs
61
98
runs-on : ubuntu-latest
99
+ needs : [changed-files]
100
+ if : ${{ needs.changed-files.outputs.docs-change == 'true' }}
62
101
63
102
steps :
64
103
- name : Checkout repository
89
128
- name : Whether the whole test suite passed
90
129
uses : re-actors/alls-green@v1.2.2
91
130
with :
131
+ allowed-skips : ${{ toJSON(needs) }}
92
132
jobs : ${{ toJSON(needs) }}
You can’t perform that action at this time.
0 commit comments