Skip to content

Commit 2916d98

Browse files
author
mjac0bs
committed
Revert "Merge branch 'develop' into M3-8777-refactor-CreateCluster-component-to-use-react-hook-form"
This reverts commit 955ed0a, reversing changes made to 84676ad.
1 parent 955ed0a commit 2916d98

File tree

1,970 files changed

+23185
-36659
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,970 files changed

+23185
-36659
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ jobs:
1616
[
1717
"linode-manager",
1818
"@linode/api-v4",
19-
"@linode/queries",
20-
"@linode/shared",
19+
"@linode/validation",
2120
"@linode/ui",
2221
"@linode/utilities",
23-
"@linode/validation",
2422
]
2523
runs-on: ubuntu-latest
2624
steps:
@@ -195,7 +193,6 @@ jobs:
195193
- run: pnpm run --filter @linode/ui test
196194

197195
test-utilities:
198-
needs: build-sdk
199196
runs-on: ubuntu-latest
200197
steps:
201198
- uses: actions/checkout@v4
@@ -207,57 +204,9 @@ jobs:
207204
with:
208205
node-version: "20.17"
209206
cache: "pnpm"
210-
- uses: actions/download-artifact@v4
211-
with:
212-
name: packages-api-v4-lib
213-
path: packages/api-v4/lib
214207
- run: pnpm install --frozen-lockfile
215208
- run: pnpm run --filter @linode/utilities test
216209

217-
test-queries:
218-
runs-on: ubuntu-latest
219-
needs: build-sdk
220-
steps:
221-
- uses: actions/checkout@v4
222-
- uses: pnpm/action-setup@v4
223-
with:
224-
run_install: false
225-
version: 10
226-
- uses: actions/setup-node@v4
227-
with:
228-
node-version: "20.17"
229-
cache: "pnpm"
230-
- uses: actions/download-artifact@v4
231-
with:
232-
name: packages-api-v4-lib
233-
path: packages/api-v4/lib
234-
- run: pnpm install --frozen-lockfile
235-
- run: pnpm run --filter @linode/queries test
236-
237-
test-shared:
238-
runs-on: ubuntu-latest
239-
needs: build-sdk
240-
steps:
241-
- uses: actions/checkout@v4
242-
- uses: pnpm/action-setup@v4
243-
with:
244-
run_install: false
245-
version: 10
246-
- uses: actions/setup-node@v4
247-
with:
248-
node-version: "20.17"
249-
cache: "pnpm"
250-
- uses: actions/download-artifact@v4
251-
with:
252-
name: packages-api-v4-lib
253-
path: packages/api-v4/lib
254-
- uses: actions/download-artifact@v4
255-
with:
256-
name: packages-validation-lib
257-
path: packages/validation/lib
258-
- run: pnpm install --frozen-lockfile
259-
- run: pnpm run --filter @linode/shared test
260-
261210
typecheck-ui:
262211
runs-on: ubuntu-latest
263212
needs: build-sdk
@@ -287,57 +236,9 @@ jobs:
287236
with:
288237
node-version: "20.17"
289238
cache: "pnpm"
290-
- uses: actions/download-artifact@v4
291-
with:
292-
name: packages-api-v4-lib
293-
path: packages/api-v4/lib
294239
- run: pnpm install --frozen-lockfile
295240
- run: pnpm run --filter @linode/utilities typecheck
296241

297-
typecheck-queries:
298-
runs-on: ubuntu-latest
299-
needs: build-sdk
300-
steps:
301-
- uses: actions/checkout@v4
302-
- uses: pnpm/action-setup@v4
303-
with:
304-
run_install: false
305-
version: 10
306-
- uses: actions/setup-node@v4
307-
with:
308-
node-version: "20.17"
309-
cache: "pnpm"
310-
- uses: actions/download-artifact@v4
311-
with:
312-
name: packages-api-v4-lib
313-
path: packages/api-v4/lib
314-
- run: pnpm install --frozen-lockfile
315-
- run: pnpm run --filter @linode/queries typecheck
316-
317-
typecheck-shared:
318-
runs-on: ubuntu-latest
319-
needs: build-sdk
320-
steps:
321-
- uses: actions/checkout@v4
322-
- uses: pnpm/action-setup@v4
323-
with:
324-
run_install: false
325-
version: 10
326-
- uses: actions/setup-node@v4
327-
with:
328-
node-version: "20.17"
329-
cache: "pnpm"
330-
- uses: actions/download-artifact@v4
331-
with:
332-
name: packages-api-v4-lib
333-
path: packages/api-v4/lib
334-
- uses: actions/download-artifact@v4
335-
with:
336-
name: packages-validation-lib
337-
path: packages/validation/lib
338-
- run: pnpm install --frozen-lockfile
339-
- run: pnpm run --filter @linode/shared typecheck
340-
341242
typecheck-manager:
342243
runs-on: ubuntu-latest
343244
needs: build-sdk
@@ -391,7 +292,7 @@ jobs:
391292
- run: pnpm install --frozen-lockfile
392293
- run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
393294
env:
394-
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
295+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
395296
- run: pnpm publish -r --filter @linode/api-v4 --filter @linode/validation --no-git-checks --access public
396297
- name: slack-notify
397298
uses: rtCamp/action-slack-notify@master

.github/workflows/coverage.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Code Coverage
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
base_branch:
7+
if: github.event.pull_request.draft == false
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
ref: ${{ github.base_ref }} # The base branch of the PR (develop)
13+
14+
- uses: pnpm/action-setup@v4
15+
with:
16+
run_install: false
17+
version: 10
18+
19+
- name: Use Node.js v20.17 LTS
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: "20.17"
23+
cache: "pnpm"
24+
25+
- name: Install Dependencies
26+
run: pnpm install --frozen-lockfile
27+
28+
- name: Build @linode/validation
29+
run: pnpm build:validation
30+
31+
- name: Build @linode/api-v4
32+
run: pnpm build:sdk
33+
34+
- name: Run Base Branch Coverage
35+
run: pnpm coverage:summary
36+
37+
- name: Write Base Coverage to an Artifact
38+
run: |
39+
coverage_json=$(cat ./packages/manager/coverage/coverage-summary.json)
40+
pct=$(echo "$coverage_json" | jq -r '.total.statements.pct')
41+
echo "$pct" > ref_code_coverage.txt
42+
43+
- name: Upload Base Coverage Artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: ref_code_coverage
47+
path: ref_code_coverage.txt
48+
49+
current_branch:
50+
# We want to make sure we only run on open PRs (not drafts), but also should run even if the base branch coverage job fails.
51+
# If the base branch coverage job fails to create a report, the current branch coverage job will fail as well, but this may help us debug the CI on the current branch.
52+
if: ${{ always() && github.event.pull_request.draft == false }}
53+
runs-on: ubuntu-latest
54+
needs: base_branch
55+
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- uses: pnpm/action-setup@v4
60+
with:
61+
run_install: false
62+
version: 10
63+
64+
- name: Use Node.js v20.17 LTS
65+
uses: actions/setup-node@v4
66+
with:
67+
node-version: "20.17"
68+
cache: "pnpm"
69+
70+
- name: Install Dependencies
71+
run: pnpm install --frozen-lockfile
72+
73+
- name: Build @linode/validation
74+
run: pnpm build:validation
75+
76+
- name: Build @linode/api-v4
77+
run: pnpm build:sdk
78+
79+
- name: Run Current Branch Coverage
80+
run: pnpm coverage:summary
81+
82+
- name: Write PR Number to an Artifact
83+
run: |
84+
echo "${{ github.event.number }}" > pr_number.txt
85+
86+
- name: Write Current Coverage to an Artifact
87+
run: |
88+
coverage_json=$(cat ./packages/manager/coverage/coverage-summary.json)
89+
pct=$(echo "$coverage_json" | jq -r '.total.statements.pct')
90+
echo "$pct" > current_code_coverage.txt
91+
92+
- name: Upload PR Number Artifact
93+
uses: actions/upload-artifact@v4
94+
with:
95+
name: pr_number
96+
path: pr_number.txt
97+
98+
- name: Upload Current Coverage Artifact
99+
uses: actions/upload-artifact@v4
100+
with:
101+
name: current_code_coverage
102+
path: current_code_coverage.txt
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Coverage Comment
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Code Coverage"]
6+
types:
7+
- completed
8+
9+
permissions:
10+
pull-requests: write
11+
12+
jobs:
13+
comment:
14+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout Code
19+
uses: actions/checkout@v4
20+
21+
- name: Use Node.js v20.17 LTS
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: "20.17"
25+
26+
- name: Download PR Number Artifact
27+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e #v2.28.0
28+
with:
29+
workflow: "coverage.yml"
30+
run_id: ${{ github.event.workflow_run.id }}
31+
name: pr_number
32+
33+
- name: Download Base Coverage Artifact
34+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e #v2.28.0
35+
with:
36+
workflow: "coverage.yml"
37+
run_id: ${{ github.event.workflow_run.id }}
38+
name: ref_code_coverage
39+
40+
- name: Download Current Coverage Artifact
41+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e #v2.28.0
42+
with:
43+
workflow: "coverage.yml"
44+
run_id: ${{ github.event.workflow_run.id }}
45+
name: current_code_coverage
46+
47+
- name: Set PR Number Environment Variables
48+
run: |
49+
echo "PR_NUMBER=$(cat pr_number.txt)" >> $GITHUB_ENV
50+
51+
- name: Generate Coverage Comment
52+
run: |
53+
base_coverage=$(cat ref_code_coverage.txt)
54+
current_coverage=$(cat current_code_coverage.txt)
55+
if (( $(echo "$current_coverage < $base_coverage" | bc -l) )); then
56+
icon="❌" # Error icon
57+
else
58+
icon="✅" # Check mark icon
59+
fi
60+
comment_message="**Coverage Report:** $icon<br>Base Coverage: $base_coverage%<br>Current Coverage: $current_coverage%"
61+
echo "Coverage: $comment_message"
62+
echo "$comment_message" > updated_comment.txt
63+
64+
- name: Post Comment
65+
uses: mshick/add-pr-comment@7c0890544fb33b0bdd2e59467fbacb62e028a096 #v2.8.1
66+
with:
67+
issue: ${{ env.PR_NUMBER }}
68+
message-path: updated_comment.txt

.github/workflows/e2e_schedule_and_push.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ env:
88
CLIENT_ID: ${{ secrets.REACT_APP_CLIENT_ID }}
99
CY_TEST_FAIL_ON_MANAGED: 1
1010
CY_TEST_RESET_PREFERENCES: 1
11-
CY_TEST_SPLIT_RUN: 1
12-
CY_TEST_SPLIT_RUN_TOTAL: 4
1311
on:
1412
schedule:
1513
- cron: "0 13 * * 1-5"
@@ -21,17 +19,14 @@ on:
2119

2220
jobs:
2321
run-cypress-e2e:
24-
name: Cypress Tests (User ${{ matrix.user.index }})
2522
runs-on: ubuntu-latest
2623
strategy:
2724
fail-fast: false
2825
matrix:
29-
user:
30-
- { index: 1, name: 'USER_1' }
31-
- { index: 2, name: 'USER_2' }
32-
- { index: 3, name: 'USER_3' }
33-
- { index: 4, name: 'USER_4' }
26+
user: ["USER_1", "USER_2", "USER_3", "USER_4"]
3427
steps:
28+
- name: install command line utilities
29+
run: sudo apt-get install -y expect
3530
- uses: actions/checkout@v4
3631
- uses: pnpm/action-setup@v4
3732
with:
@@ -41,16 +36,23 @@ jobs:
4136
with:
4237
node-version: "20.17"
4338
- run: |
39+
echo "CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }}" >> $GITHUB_ENV
4440
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
41+
- run: echo "MANAGER_OAUTH=$USER_1" >> ./packages/manager/.env
42+
if: matrix['user'] == 'USER_1'
43+
- run: echo "MANAGER_OAUTH=$USER_2" >> ./packages/manager/.env
44+
if: matrix['user'] == 'USER_2'
45+
- run: echo "MANAGER_OAUTH=$USER_3" >> ./packages/manager/.env
46+
if: matrix['user'] == 'USER_3'
47+
- run: echo "MANAGER_OAUTH=$USER_4" >> ./packages/manager/.env
48+
if: matrix['user'] == 'USER_4'
4549
- run: |
4650
echo "REACT_APP_LAUNCH_DARKLY_ID=${{ secrets.REACT_APP_LAUNCH_DARKLY_ID }}" >> ./packages/manager/.env
4751
echo "REACT_APP_CLIENT_ID=$CLIENT_ID" >> ./packages/manager/.env
4852
echo "REACT_APP_LOGIN_ROOT=${{ secrets.REACT_APP_LOGIN_ROOT }}" >> ./packages/manager/.env
4953
echo "REACT_APP_API_ROOT=${{ secrets.REACT_APP_API_ROOT }}" >> ./packages/manager/.env
5054
echo "REACT_APP_APP_ROOT=${{ secrets.REACT_APP_APP_ROOT }}" >> ./packages/manager/.env
5155
echo "REACT_APP_DISABLE_NEW_RELIC=1" >> ./packages/manager/.env
52-
echo "MANAGER_OAUTH=${{ secrets[matrix.user.name] }}" >> ./packages/manager/.env
53-
echo "CY_TEST_SPLIT_RUN_INDEX=${{ matrix.user.index }}" >> ./packages/manager/.env
5456
- run: pnpm install --frozen-lockfile
5557
- run: pnpm run --filter @linode/validation build
5658
- run: pnpm run --filter @linode/api-v4 build
@@ -64,5 +66,5 @@ jobs:
6466
build: pnpm run build
6567
start: pnpm start:ci
6668
browser: chrome
67-
record: false
68-
parallel: false
69+
record: true
70+
parallel: true

0 commit comments

Comments
 (0)