-
-
Notifications
You must be signed in to change notification settings - Fork 400
64 lines (53 loc) · 1.88 KB
/
e2e-node.yml
File metadata and controls
64 lines (53 loc) · 1.88 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
# .github/workflows/e2e-node-federation.yml
name: E2E Node Federation
on:
workflow_call:
jobs:
e2e-node:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout Repository
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js 20
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Export SKIP_DEVTOOLS_POSTINSTALL
run: echo "SKIP_DEVTOOLS_POSTINSTALL=true" >> "$GITHUB_ENV"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Restore Turborepo cache
uses: actions/cache/restore@v5
with:
path: .turbo/cache
key: ${{ runner.os }}-turbo-${{ github.ref_name }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-turbo-${{ github.ref_name }}-
${{ runner.os }}-turbo-
- name: Install Cypress
run: npx cypress install
- name: Build shared packages
run: pnpm run build:packages
- name: Check CI conditions
id: check-ci
run: |
ci_status=0
node tools/scripts/ci-is-affected.mjs --appName=node-host,node-local-remote,node-remote,node-dynamic-remote-new-version,node-dynamic-remote,node-host-e2e || ci_status=$?
if [ "$ci_status" -eq 0 ]; then
echo "run-e2e=true" >> "$GITHUB_OUTPUT"
elif [ "$ci_status" -eq 1 ]; then
echo "run-e2e=false" >> "$GITHUB_OUTPUT"
else
echo "ci-is-affected failed with unexpected exit code: $ci_status" >&2
exit "$ci_status"
fi
- name: E2E Node Federation
if: steps.check-ci.outputs.run-e2e == 'true'
run: pnpm run e2e:node