-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (58 loc) · 1.57 KB
/
test.yaml
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
name: Test
"on":
pull_request:
types:
- opened
- synchronize
- edited
- reopened
branches:
- '*'
jobs:
test:
name: Test, Lint, Typecheck and Quick-Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.18.0
- uses: bahmutov/[email protected]
with:
useRollingCache: true
- name: Run Yarn tests
run: CI=true yarn test
- name: Run Yarn lint
run: CI=true yarn lint
- name: Run TSC Typecheck
run: CI=true tsc -p tsconfig.json --noEmit --incremental
- name: Run Yarn Build
run: CI=true yarn build
cypress:
name: Cypress Tests
runs-on: ubuntu-latest
container: cypress/browsers:node-20.11.1-chrome-123.0.6312.58-1-ff-124.0-edge-122.0.2365.92-1
steps:
- uses: actions/checkout@v4
- uses: bahmutov/[email protected]
with:
useRollingCache: true
- uses: cypress-io/github-action@v6
with:
install: "false"
browser: chrome
start: npm run dev
wait-on: http://localhost:3000
config-file: cypress.config.ts
env:
PREVIEW_ENDPOINT: "http://localhost:3000"
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: cypress-screenshots
path: ./cypress/screenshots
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: cypress-videos
path: ./cypress/videos