@@ -48,13 +48,41 @@ jobs:
48
48
- 'infrastructure/blueprints/prevent_privilege_escalation.py'
49
49
- 'infrastructure/blueprints/test_runner_boundary.py'
50
50
- 'infrastructure/test-alt/common/**'
51
+ info :
52
+ name : Output useful information
53
+ runs-on : ubuntu-latest
54
+ outputs :
55
+ is-actor-bot : ${{ steps.gh-context.outputs.is-actor-bot }} # if the actor (user) is a bot
56
+ is-fork : ${{ steps.gh-context.outputs.is-fork }} # if the action is running in or from (PR) a fork
57
+ repo-head : ${{ steps.gh-context.outputs.repo-head }} # repo where change occurred
58
+ repo-origin : ${{ steps.gh-context.outputs.repo-origin }} # origin of codebase
59
+ steps :
60
+ - name : Output GitHub Context
61
+ id : gh-context
62
+ run : |
63
+ export _REPO_ORIGIN="onicagroup/runway";
64
+ echo "repo-origin=${_REPO_ORIGIN}" >> "${GITHUB_OUTPUT}";
65
+ export _REPO_HEAD="${{ github.event.pull_request.head.repo.full_name || github.repository }}";
66
+ echo "repo-head=${_REPO_HEAD}" >> "${GITHUB_OUTPUT}";
67
+ if [[ "${_REPO_HEAD}" == "${_REPO_ORIGIN}" ]]; then
68
+ echo "is-fork=false" >> "${GITHUB_OUTPUT}";
69
+ else
70
+ echo "is-fork=true" >> "${GITHUB_OUTPUT}";
71
+ fi;
72
+ if [[ ${{ github.actor }} == *"[bot]" ]]; then
73
+ echo "is-actor-bot=true" >> "${GITHUB_OUTPUT}";
74
+ else
75
+ echo "is-actor-bot=false" >> "${GITHUB_OUTPUT}";
76
+ fi;
51
77
deploy-test-infrastructure :
52
78
name : Deploy Test Infrastructure
53
79
environment : test
54
80
concurrency : test-infrastructure
55
- needs : changes
81
+ needs :
82
+ - changes
83
+ - info
56
84
if : |
57
- github.repository == 'onicagroup/runway ' &&
85
+ needs.info.outputs.is-fork == 'false ' &&
58
86
(needs.changes.outputs.infra-test == 'true' || needs.changes.outputs.infra-test-alt == 'true')
59
87
runs-on : ubuntu-latest
60
88
steps :
73
101
- name : Ensure Cache Is Healthy
74
102
if : runner.os != 'Windows' && steps.cache.outputs.cache-hit == 'true'
75
103
run : poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
76
- - run : poetry install --extras docs - vv
104
+ - run : poetry install -vv
77
105
- name : Configure AWS Credentials
78
106
uses : aws-actions/configure-aws-credentials@v4
79
107
with :
@@ -115,7 +143,7 @@ jobs:
115
143
- name : Ensure Cache Is Healthy
116
144
if : runner.os != 'Windows' && steps.cache.outputs.cache-hit == 'true'
117
145
run : poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
118
- - run : poetry install --extras docs - vv
146
+ - run : poetry install -vv
119
147
- name : Install Node Dependencies
120
148
run : make npm-ci
121
149
- name : Run Linters
@@ -141,16 +169,17 @@ jobs:
141
169
- name : Ensure Cache Is Healthy
142
170
if : runner.os != 'Windows' && steps.cache.outputs.cache-hit == 'true'
143
171
run : poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
144
- - run : poetry install --extras docs - vv
172
+ - run : poetry install -vv
145
173
-
uses :
pre-commit/[email protected]
146
174
test-functional :
147
175
name : Functional Tests
148
- needs : deploy-test-infrastructure
149
- # will fail if run from forks
176
+ needs :
177
+ - deploy-test-infrastructure
178
+ - info
150
179
if : |
151
180
always() &&
152
- github.repository == 'onicagroup/runway ' &&
153
- github. actor != 'dependabot[bot] ' &&
181
+ needs.info.outputs.is-fork == 'false ' &&
182
+ needs.info.outputs.is- actor-bot == 'false ' &&
154
183
(needs.deploy-test-infrastructure.result == 'success' || needs.deploy-test-infrastructure.result == 'skipped')
155
184
runs-on : ubuntu-latest
156
185
steps :
@@ -172,7 +201,7 @@ jobs:
172
201
- name : Ensure Cache Is Healthy
173
202
if : runner.os != 'Windows' && steps.cache.outputs.cache-hit == 'true'
174
203
run : poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
175
- - run : poetry install --extras docs - vv
204
+ - run : poetry install -vv
176
205
- name : Install Ubuntu Dependencies
177
206
run : |
178
207
sudo apt update -y
@@ -218,7 +247,7 @@ jobs:
218
247
- name : Ensure Cache Is Healthy
219
248
if : steps.cache.outputs.cache-hit == 'true'
220
249
run : poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
221
- - run : poetry install --extras docs - vv
250
+ - run : poetry install -vv
222
251
- name : Install Node Dependencies
223
252
run : make npm-install
224
253
- name : Configure Pagefile # avoid MemoryError during tests
@@ -266,7 +295,7 @@ jobs:
266
295
- name : Ensure Cache Is Healthy
267
296
if : runner.os != 'Windows' && steps.cache.outputs.cache-hit == 'true'
268
297
run : poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
269
- - run : poetry install --extras docs - vv
298
+ - run : poetry install -vv
270
299
- name : Run Build
271
300
run : make build
272
301
- name : Upload Distribution Artifact
0 commit comments