-
Notifications
You must be signed in to change notification settings - Fork 3
94 lines (77 loc) · 2.61 KB
/
e2e-waveform.yml
File metadata and controls
94 lines (77 loc) · 2.61 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
name: e2e-waveform
on:
push:
branches:
- main
pull_request:
concurrency:
group: e2e-waveform-${{ github.ref }}
cancel-in-progress: true
jobs:
waveform-e2e:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
- name: Cache Playwright browser
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-chromium-1.58.2
- name: Install dependencies
run: npm ci
- name: Prepare Surfer assets
run: scripts/setup-surfer.sh
- name: Ensure CIRCT wasm artifacts
id: circt_artifacts
run: |
mkdir -p static/circt
have_all_artifacts() {
[ -f static/circt/circt-verilog.js ] && \
[ -f static/circt/circt-verilog.wasm ] && \
[ -f static/circt/circt-sim.js ] && \
[ -f static/circt/circt-sim.wasm ]
}
if have_all_artifacts; then
echo "ready=true" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "Local CIRCT wasm artifacts missing; trying release 'circt-wasm'..."
if gh release download circt-wasm \
--repo "$GITHUB_REPOSITORY" \
-D static/circt \
--clobber 2>/dev/null; then
if have_all_artifacts; then
echo "ready=true" >> "$GITHUB_OUTPUT"
exit 0
fi
fi
echo "ready=false" >> "$GITHUB_OUTPUT"
echo "::notice::Skipping waveform E2E: CIRCT wasm artifacts are missing (expected under static/circt or release circt-wasm)."
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build app
if: steps.circt_artifacts.outputs.ready == 'true'
run: npm run build
- name: Run unit tests
if: steps.circt_artifacts.outputs.ready == 'true'
run: npm test
- name: Install Playwright browser
if: steps.circt_artifacts.outputs.ready == 'true'
run: npx playwright install --with-deps chromium
- name: Run waveform E2E
if: steps.circt_artifacts.outputs.ready == 'true'
run: npm run test:e2e -- e2e/waveform.spec.js
- name: Upload Playwright artifacts
if: always() && steps.circt_artifacts.outputs.ready == 'true'
uses: actions/upload-artifact@v4
with:
name: playwright-waveform-${{ github.run_id }}
path: |
playwright-report
test-results
if-no-files-found: ignore