-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (45 loc) · 1.27 KB
/
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
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint
run: bun lint
- name: Run type checks
run: bun x tsc -p tsconfig.json --noEmit
- name: Build frontend
run: bun run build
- name: Install Playwright Browsers
run: bun x playwright install --with-deps
- name: Unit & Component Tests
run: bun run test:unit
# Start the frontend server in the background
- name: Start frontend server
run: |
nohup bun run preview -- --port 5173 &
shell: bash
# Wait for the server to be ready
- name: Wait for server to be ready
run: bun x wait-on http://localhost:5173
- name: Run Playwright tests
run: bun run test:e2e
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: test-artifacts
path: |
playwright-report/
src/**/__screenshots__/**/*.png
retention-days: 30