-
-
Notifications
You must be signed in to change notification settings - Fork 251
97 lines (77 loc) · 2.28 KB
/
build-and-test.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
name: Build Affected Packages
on:
pull_request:
branches: [main, '**']
push:
branches: [main]
jobs:
checkout-install:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Pnpm
run: corepack enable
- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'
- name: Set Nx SHA
uses: nrwl/nx-set-shas@v3
- name: Install Dependencies
run: pnpm install
- name: Install Cypress
run: npx cypress install
- name: Check Code Format
run: npx nx format:check
- name: Warm Nx Cache
run: npx nx run-many --targets=build --projects=tag:type:pkg
- name: Run Build for All
run: npx nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache
- name: Run Affected Test
uses: nick-fields/retry@v3
with:
max_attempts: 2
timeout_minutes: 10
command: npx nx affected -t test --parallel=3 --exclude='*,!tag:type:pkg' --skip-nx-cache
- name: Run Affected Experimental Tests
uses: nick-fields/retry@v3
with:
max_attempts: 2
timeout_minutes: 10
command: npx nx affected -t test:experiments --parallel=1 --exclude='*,!tag:type:pkg' --skip-nx-cache
e2e-modern:
needs: checkout-install
uses: ./.github/workflows/e2e-modern.yml
secrets: inherit
e2e-runtime:
needs: checkout-install
uses: ./.github/workflows/e2e-runtime.yml
secrets: inherit
e2e-manifest:
needs: checkout-install
uses: ./.github/workflows/e2e-manifest.yml
secrets: inherit
e2e-node:
needs: checkout-install
uses: ./.github/workflows/e2e-node.yml
secrets: inherit
e2e-next-dev:
needs: checkout-install
uses: ./.github/workflows/e2e-next-dev.yml
secrets: inherit
e2e-next-prod:
needs: checkout-install
uses: ./.github/workflows/e2e-next-prod.yml
secrets: inherit
e2e-modern-ssr:
needs: checkout-install
uses: ./.github/workflows/e2e-modern-ssr.yml
secrets: inherit
e2e-router:
needs: checkout-install
uses: ./.github/workflows/e2e-router.yml
secrets: inherit