-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathcommon-testing-big-instance.yml
More file actions
167 lines (162 loc) · 5.16 KB
/
common-testing-big-instance.yml
File metadata and controls
167 lines (162 loc) · 5.16 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: common-testing-big-instance
on:
workflow_call:
inputs:
args-tests:
type: string
required: false
default: ""
working-directory:
type: string
required: true
build-publish-docs:
type: boolean
required: false
default: false
run-minio:
type: boolean
required: false
default: false
run-redis:
type: boolean
required: false
default: false
run-wasm:
type: boolean
required: false
default: false
wasm-test-feature:
type: string
required: false
default: "-F wasm_tests"
package-name:
type: string
required: true
test-coverage:
type: boolean
required: false
default: false
test-minimum-coverage:
type: string
required: false
default: 0
npm-release:
type: boolean
required: false
default: false
slab-backend:
type: string
required: false
default: "big-instance"
app-cache-dir:
type: string
required: true
nextest-profile:
type: string
required: false
default: 'ci' # Use 'ci-nightly' for nightly builds that run all tests
nextest-test-threads:
type: string
required: false
default: "" # Empty = let nextest decide (respects #[serial] attribute)
secrets:
CODECOV_TOKEN:
required: false
SLAB_ACTION_TOKEN:
required: true
SLAB_BASE_URL:
required: true
JOB_SECRET:
required: true
GHCR_READ_TOKEN:
required: true
BLOCKCHAIN_ACTIONS_TOKEN:
required: true
AWS_ACCESS_KEY_S3_USER:
required: true
AWS_SECRET_KEY_S3_USER:
required: true
SLACK_CHANNEL:
required: true
BOT_USERNAME:
required: true
SLACK_WEBHOOK:
required: true
CGR_USERNAME:
required: true
CGR_PASSWORD:
required: true
env:
CARGO_TERM_COLOR: always
# No top-level permissions needed - job-level permissions are more specific
permissions: {}
jobs:
start-runner:
name: common-testing-big-instance/start-runner
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
steps:
- name: Start EC2 runner
id: start-ec2-runner
uses: zama-ai/slab-github-runner@5aee5d157f4a0201e5eaefc9cc648e5f9f5472a5 # v1.6.0
with:
mode: start
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
slab-url: ${{ secrets.SLAB_BASE_URL }}
job-secret: ${{ secrets.JOB_SECRET }}
backend: aws
profile: ${{ inputs.slab-backend }}
run-build:
name: common-testing-big-instance/run-build
permissions:
actions: read # Required to read workflow run information and download artifacts
checks: write # Required to create GitHub checks for test results
contents: read # Required to checkout repository code
issues: write # Required to create comments on issues
packages: read # Required to read GitHub packages/container registry
pull-requests: write # Required to create comments on pull requests
needs: start-runner
uses: ./.github/workflows/common-testing.yml
secrets:
GHCR_READ_TOKEN: ${{ secrets.GHCR_READ_TOKEN }}
BLOCKCHAIN_ACTIONS_TOKEN: ${{ secrets.BLOCKCHAIN_ACTIONS_TOKEN }}
AWS_ACCESS_KEY_S3_USER: ${{ secrets.AWS_ACCESS_KEY_S3_USER }}
AWS_SECRET_KEY_S3_USER: ${{ secrets.AWS_SECRET_KEY_S3_USER }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
BOT_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CGR_USERNAME: ${{ secrets.CGR_USERNAME }}
CGR_PASSWORD: ${{ secrets.CGR_PASSWORD }}
with:
runs-on: ${{ needs.start-runner.outputs.label }}
build-publish-docs: ${{ inputs.build-publish-docs }}
working-directory: ${{ inputs.working-directory }}
args-tests: ${{ inputs.args-tests }}
run-minio: ${{ inputs.run-minio }}
run-redis: ${{ inputs.run-redis }}
run-wasm: ${{ inputs.run-wasm }}
package-name: ${{ inputs.package-name }}
wasm-test-feature: ${{ inputs.wasm-test-feature }}
test-coverage: ${{ inputs.test-coverage }}
npm-release: ${{ inputs.npm-release }}
app-cache-dir: ${{ inputs.app-cache-dir }}
nextest-profile: ${{ inputs.nextest-profile }}
nextest-test-threads: ${{ inputs.nextest-test-threads }}
stop-runner:
name: common-testing-big-instance/stop-runner
needs:
- start-runner
- run-build
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
- name: Stop EC2 runner
uses: zama-ai/slab-github-runner@5aee5d157f4a0201e5eaefc9cc648e5f9f5472a5 # v1.6.0
with:
mode: stop
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
slab-url: ${{ secrets.SLAB_BASE_URL }}
job-secret: ${{ secrets.JOB_SECRET }}
label: ${{ needs.start-runner.outputs.label }}