-
Notifications
You must be signed in to change notification settings - Fork 60
208 lines (183 loc) · 6.58 KB
/
merge-queue.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
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
name: Validate code in the merge queue (post merge)
on:
workflow_dispatch: {}
merge_group:
defaults:
run:
shell: bash -euxo pipefail {0}
concurrency:
group: merge-queue-post-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
COMPOSE_HTTP_TIMEOUT: 180
SKIP_GENERATED_CACHE: ${{ contains(github.event.pull_request.labels.*.name, 'skip-generated-cache') }}
NX_AFFECTED_ALL: ${{ contains(github.event.pull_request.labels.*.name, 'nx-affected-all') }}
CHUNK_SIZE: ${{ vars.CHUNK_SIZE || 3 }}
DISABLE_GROUPING: ${{ vars.DISABLE_GROUPING || false }}
DISABLE_CHUNKS: ${{ vars.DISABLE_CHUNKS || false }}
DISABLE_PROBLEMATIC: ${{ vars.DISABLE_PROBLEMATIC || false }}
MAX_JOBS: ${{ vars.MAX_JOBS || 2 }}
NX_PARALLEL: ${{ vars.NX_PARALLEL || 2 }}
NX_MAX_PARALLEL: ${{ vars.NX_MAX_PARALLEL || 4 }}
jobs:
# prepare:
# runs-on: arc-runners
# timeout-minutes: 35
# env:
# AFFECTED_ALL: ${{ secrets.AFFECTED_ALL }}
# SERVERSIDE_FEATURES_ON: ''
# DOCKER_REGISTRY: 821090935708.dkr.ecr.eu-west-1.amazonaws.com/
# outputs:
# CACHE_KEYS: ${{ steps.get_cache.outputs.keys }}
# TEST_CHUNKS: ${{ steps.build_info.outputs.TEST_CHUNKS }}
# E2E_CHUNKS: ${{ steps.build_info.outputs.E2E_CHUNKS }}
# E2E_BUILD_ID: ${{ steps.build_info.outputs.BUILD_ID }}
# BUILD_CHUNKS: ${{ steps.build_info.outputs.BUILD_CHUNKS }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - uses: actions/setup-node@v4
# with:
# node-version-file: 'package.json'
# - name: Setup yarn
# run: corepack enable
# - name: Get cache
# id: get_cache
# uses: ./.github/actions/get-cache
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# enable-cache: 'node_modules,cypress'
# - name: Derive appropriate SHAs
# uses: nrwl/nx-set-shas@v4
# - name: Gather branch info
# id: build_info
# run: |
# export BASE=${{ env.NX_BASE }}
# export HEAD=${{ env.NX_HEAD }}
# echo "TEST_CHUNKS={\"projects\":$(./scripts/ci/generate-chunks.sh test)}" >> "$GITHUB_OUTPUT"
# echo "BUILD_CHUNKS={\"projects\":$(./scripts/ci/generate-chunks.sh build)}" >> "$GITHUB_OUTPUT"
# echo "E2E_CHUNKS={\"projects\":$(./scripts/ci/generate-chunks.sh e2e-ci)}" >> "$GITHUB_OUTPUT"
# echo BUILD_ID="$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER-$(uuidgen)" >> "$GITHUB_OUTPUT"
# tests:
# needs:
# - prepare
# if: needs.prepare.outputs.TEST_CHUNKS
# runs-on: ec2-runners
# container:
# image: public.ecr.aws/m3u4c4h9/island-is/actions-runner-public:latest
# env:
# AFFECTED_PROJECTS: ${{ matrix.projects }}
# strategy:
# fail-fast: false
# matrix: ${{ fromJson(needs.prepare.outputs.TEST_CHUNKS) }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version-file: 'package.json'
# - name: Setup yarn
# run: corepack enable
# - name: Get cache
# id: get-cache
# uses: ./.github/actions/get-cache
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# keys: ${{ needs.prepare.outputs.CACHE_KEYS }}
# enable-cache: 'node_modules,cypress'
# - uses: ./.github/actions/unit-test
# with:
# dd-api-key: '${{ secrets.DD_API_KEY }}'
# codecov-token: ${{ secrets.CODECOV_TOKEN }}
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# docker-registry: 821090935708.dkr.ecr.eu-west-1.amazonaws.com/
# e2e:
# needs:
# - prepare
# if: needs.prepare.outputs.E2E_CHUNKS
# runs-on: arc-runners
# timeout-minutes: 45
# env:
# AFFECTED_PROJECT: ${{ matrix.projects }}
# CYPRESS_PROJECT_ID: 4q7jz8
# CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# API_MOCKS: 'true'
# NODE_OPTIONS: --max-old-space-size=4096
# E2E_BUILD_ID: '${{ needs.prepare.outputs.E2E_BUILD_ID }}-${{ github.run_attempt }}'
# strategy:
# fail-fast: false
# matrix: ${{ fromJson(needs.prepare.outputs.E2E_CHUNKS) }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version-file: 'package.json'
# - name: Setup yarn
# run: corepack enable
# - name: Get cache
# id: get-cache
# uses: ./.github/actions/get-cache
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# keys: ${{ needs.prepare.outputs.CACHE_KEYS }}
# enable-cache: 'node_modules,cypress'
# - name: Running e2e tests
# run: ./scripts/ci/40_e2e.sh "${AFFECTED_PROJECT}"
# build:
# needs:
# - prepare
# runs-on: arc-runners
# timeout-minutes: 35
# env:
# AFFECTED_PROJECTS: ${{ matrix.projects }}
# strategy:
# fail-fast: true
# matrix: ${{ fromJson(needs.prepare.outputs.BUILD_CHUNKS) }}
# if: needs.prepare.outputs.BUILD_CHUNKS
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version-file: 'package.json'
# - name: Setup yarn
# run: corepack enable
# - name: Get cache
# id: get-cache
# uses: ./.github/actions/get-cache
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# keys: ${{ needs.prepare.outputs.CACHE_KEYS }}
# enable-cache: 'node_modules'
# - name: Building
# run: ./scripts/ci/run-in-parallel-native.sh build
success:
runs-on: arc-runners
# if: ${{ !cancelled() }}
# needs:
# - prepare
# - tests
# - e2e
# - build
steps:
- name: Announce success
run: echo "Build is successful"
# - name: Check prepare success
# run: '[[ ${{ needs.prepare.result }} == "success" ]] || exit 1'
# - name: Check tests success
# run: '[[ ${{ needs.tests.result }} != "failure" ]] || exit 1'
# - name: Check e2e success
# run: '[[ ${{ needs.e2e.result }} != "failure" ]] || exit 1'
# - name: Check build success
# run: '[[ ${{ needs.build.result }} != "failure" ]] || exit 1'
# Remove this as a required status check and switch to something more meaningful
codeowners-check:
name: Lint CODEOWNERS
runs-on: arc-runners
env:
CHECK: 'false'
steps:
- name: Codeowners validation
run: |
exit 0