Repository navigation
65 lines (53 loc) · 1.58 KB
/
Copy pathci.yml
File metadata and controls
65 lines (53 loc) · 1.58 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
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
# The event keeps a run started by hand from cancelling a push's run, which Deploy
# needs to finish: it publishes only what a push's run passed.
concurrency:
group: ci-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Type check
run: npm run typecheck
- name: Unit tests
run: npm test
- name: Build
run: npm run build
# Drives the runner image's Google Chrome instead of
# `playwright install --with-deps`, whose apt step can stall for minutes.
- name: End-to-end tests
run: npm run e2e
timeout-minutes: 8
env:
CHROMIUM_PATH: /usr/bin/google-chrome
# Traces hold full request headers and this repo is public. Upload them
# only from credential-free jobs; a job that sets GITNOTE_E2E_TOKEN
# records no traces and must not add this step.
- name: Upload Playwright traces
if: failure()
uses: actions/upload-artifact@v7
with:
name: playwright-results
path: app/test-results/
retention-days: 7
if-no-files-found: ignore