This repository was archived by the owner on Jun 30, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
105 lines (86 loc) · 3.14 KB
/
Copy pathtest.yml
File metadata and controls
105 lines (86 loc) · 3.14 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
95
96
97
98
99
100
101
102
103
104
105
name: Frontend Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
merge_group:
branches: [main]
permissions: read-all
jobs:
# Frontend tests (always runs to produce a check, but skips work if no frontend changes)
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v6.0.1
- name: Check for frontend changes
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: changes
with:
filters: |
frontend:
- '!infra/**'
- '!infra-signup/**'
- '!docs/**'
- '.github/workflows/test.yml'
signup:
- 'infra-signup/**'
- '.github/workflows/test.yml'
- name: Skip notification
if: steps.changes.outputs.frontend != 'true'
run: |
echo "::notice::No frontend files changed. Tests skipped but check passed."
echo "Frontend tests are only run when files outside infra/** and docs/** are modified."
- name: Enable Corepack
if: steps.changes.outputs.frontend == 'true'
run: corepack enable
- name: Setup Node.js
if: steps.changes.outputs.frontend == 'true'
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: "20.17.0"
cache: "yarn"
- name: Install dependencies
if: steps.changes.outputs.frontend == 'true'
run: yarn install --immutable
- name: Install Playwright Browsers
if: steps.changes.outputs.frontend == 'true'
run: npx playwright install --with-deps
- name: Install mitmproxy
if: steps.changes.outputs.frontend == 'true'
run: |
sudo apt-get update
sudo apt-get install -y mitmproxy
- name: Start mitmproxy
if: steps.changes.outputs.frontend == 'true'
run: |
mitmproxy --listen-port 8081 -s scripts/mitmproxy-addon.py &
sleep 5
- name: Run unit tests
if: steps.changes.outputs.frontend == 'true'
run: yarn test
# Signup Lambda tests
- name: Skip signup notification
if: steps.changes.outputs.signup != 'true'
run: |
echo "::notice::No signup infrastructure files changed. Signup tests skipped."
- name: Install signup dependencies
if: steps.changes.outputs.signup == 'true'
working-directory: infra-signup
run: yarn install --immutable
- name: Run signup tests
if: steps.changes.outputs.signup == 'true'
working-directory: infra-signup
run: yarn test
# Temporarily disabled - proxy configuration issues in CI
# - name: Run E2E tests
# run: yarn test:e2e
# - name: Run Accessibility tests (Story 5.10)
# run: yarn test:e2e:accessibility
- name: Upload Playwright artifacts
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: playwright-report
path: playwright-report/
retention-days: 7