@@ -34,131 +34,80 @@ jobs:
34
34
run : |
35
35
echo "commit-sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
36
36
37
- check-label :
38
- needs : [changes]
39
- runs-on : buildjet-2vcpu-ubuntu-2204
40
- name : Check for E2E label
41
- outputs :
42
- run-e2e : ${{ steps.check-if-pr-has-label.outputs.run-e2e == 'true' && (github.event.action != 'labeled' || (github.event.action == 'labeled' && github.event.label.name == 'ready-for-e2e')) }}
43
- run-jobs : ${{ github.event.action != 'labeled' }}
44
- steps :
45
- - name : Check if PR exists with ready-for-e2e label for this SHA
46
- id : check-if-pr-has-label
47
- uses : actions/github-script@v7
48
- with :
49
- script : |
50
- let labels = [];
51
-
52
- if (context.payload.pull_request) {
53
- labels = context.payload.pull_request.labels;
54
- } else {
55
- try {
56
- const sha = '${{ needs.changes.outputs.commit-sha }}';
57
- console.log('sha', sha);
58
- const { data: prs } = await github.rest.repos.listPullRequestsAssociatedWithCommit({
59
- owner: context.repo.owner,
60
- repo: context.repo.repo,
61
- commit_sha: sha
62
- });
63
-
64
- if (prs.length === 0) {
65
- core.setOutput('run-e2e', false);
66
- console.log(`No pull requests found for commit SHA ${sha}`);
67
- return;
68
- }
69
-
70
- const pr = prs[0];
71
- console.log(`PR number: ${pr.number}`);
72
- console.log(`PR title: ${pr.title}`);
73
- console.log(`PR state: ${pr.state}`);
74
- console.log(`PR URL: ${pr.html_url}`);
75
-
76
- labels = pr.labels;
77
- }
78
- catch (e) {
79
- core.setOutput('run-e2e', false);
80
- console.log(e);
81
- }
82
- }
83
-
84
- const labelFound = labels.map(l => l.name).includes('ready-for-e2e');
85
- console.log('Found the label?', labelFound);
86
- core.setOutput('run-e2e', labelFound);
87
-
88
37
type-check :
89
38
name : Type check
90
- needs : [changes, check-label ]
91
- if : ${{ needs.check-label.outputs.run-jobs == 'true' && needs. changes.outputs.has-files-requiring-all-checks == 'true' }}
39
+ needs : [changes]
40
+ if : ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
92
41
uses : ./.github/workflows/check-types.yml
93
42
secrets : inherit
94
43
95
44
lint :
96
45
name : Linters
97
- needs : [changes, check-label ]
98
- if : ${{ needs.check-label.outputs.run-jobs == 'true' && needs. changes.outputs.has-files-requiring-all-checks == 'true' }}
46
+ needs : [changes]
47
+ if : ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
99
48
uses : ./.github/workflows/lint.yml
100
49
secrets : inherit
101
50
102
51
unit-test :
103
52
name : Tests
104
- needs : [changes, check-label ]
105
- if : ${{ needs.check-label.outputs.run-jobs == 'true' && needs. changes.outputs.has-files-requiring-all-checks == 'true' }}
53
+ needs : [changes]
54
+ if : ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
106
55
uses : ./.github/workflows/unit-tests.yml
107
56
secrets : inherit
108
57
109
58
integration-test :
110
59
name : Tests
111
- needs : [changes, check-label ]
112
- if : ${{ needs.check-label.outputs.run-jobs == 'true' && needs. changes.outputs.has-files-requiring-all-checks == 'true' }}
60
+ needs : [changes]
61
+ if : ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
113
62
uses : ./.github/workflows/integration-tests.yml
114
63
secrets : inherit
115
64
116
65
build-api-v1 :
117
66
name : Production builds
118
- needs : [changes, check-label ]
119
- if : ${{ needs.check-label.outputs.run-e2e == 'true' && needs. changes.outputs.has-files-requiring-all-checks == 'true' }}
67
+ needs : [changes]
68
+ if : ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
120
69
uses : ./.github/workflows/api-v1-production-build.yml
121
70
secrets : inherit
122
71
123
72
build-api-v2 :
124
73
name : Production builds
125
- needs : [changes, check-label ]
126
- if : ${{ needs.check-label.outputs.run-e2e == 'true' && needs. changes.outputs.has-files-requiring-all-checks == 'true' }}
74
+ needs : [changes]
75
+ if : ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
127
76
uses : ./.github/workflows/api-v2-production-build.yml
128
77
secrets : inherit
129
78
130
79
build :
131
80
name : Production builds
132
- needs : [changes, check-label ]
133
- if : ${{ needs.check-label.outputs.run-e2e == 'true' && needs. changes.outputs.has-files-requiring-all-checks == 'true' }}
81
+ needs : [changes]
82
+ if : ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
134
83
uses : ./.github/workflows/production-build-without-database.yml
135
84
secrets : inherit
136
85
137
86
e2e :
138
87
name : Tests
139
- needs : [changes, lint, check-label, build, build-api-v1, build-api-v2]
140
- if : ${{ needs.check-label.outputs.run-e2e == 'true' && needs. changes.outputs.has-files-requiring-all-checks == 'true' }}
88
+ needs : [changes, lint, build, build-api-v1, build-api-v2]
89
+ if : ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
141
90
uses : ./.github/workflows/e2e.yml
142
91
secrets : inherit
143
92
144
93
e2e-app-store :
145
94
name : Tests
146
- needs : [changes, lint, check-label, build, build-api-v1, build-api-v2]
147
- if : ${{ needs.check-label.outputs.run-e2e == 'true' && needs. changes.outputs.has-files-requiring-all-checks == 'true' }}
95
+ needs : [changes, lint, build, build-api-v1, build-api-v2]
96
+ if : ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
148
97
uses : ./.github/workflows/e2e-app-store.yml
149
98
secrets : inherit
150
99
151
100
e2e-embed :
152
101
name : Tests
153
- needs : [changes, lint, check-label, build, build-api-v1, build-api-v2]
154
- if : ${{ needs.check-label.outputs.run-e2e == 'true' && needs. changes.outputs.has-files-requiring-all-checks == 'true' }}
102
+ needs : [changes, lint, build, build-api-v1, build-api-v2]
103
+ if : ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
155
104
uses : ./.github/workflows/e2e-embed.yml
156
105
secrets : inherit
157
106
158
107
e2e-embed-react :
159
108
name : Tests
160
- needs : [changes, lint, check-label, build, build-api-v1, build-api-v2]
161
- if : ${{ needs.check-label.outputs.run-e2e == 'true' && needs. changes.outputs.has-files-requiring-all-checks == 'true' }}
109
+ needs : [changes, lint, build, build-api-v1, build-api-v2]
110
+ if : ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
162
111
uses : ./.github/workflows/e2e-embed-react.yml
163
112
secrets : inherit
164
113
@@ -169,7 +118,7 @@ jobs:
169
118
secrets : inherit
170
119
171
120
required :
172
- needs : [changes, lint, type-check, unit-test, integration-test, check-label, build, build-api-v1, build-api-v2, e2e, e2e-embed, e2e-embed-react, e2e-app-store]
121
+ needs : [changes, lint, type-check, unit-test, integration-test, build, build-api-v1, build-api-v2, e2e, e2e-embed, e2e-embed-react, e2e-app-store]
173
122
if : always()
174
123
runs-on : buildjet-2vcpu-ubuntu-2204
175
124
steps :
0 commit comments