-
-
Notifications
You must be signed in to change notification settings - Fork 9
104 lines (98 loc) · 2.83 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
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
name: Tests
on: pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --max-old-space-size=4096
NEXT_PUBLIC_VERCEL_URL: nitric.io
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: cypress-io/github-action@v5
with:
runTests: false
install-command: yarn --frozen-lockfile
- name: Run format linting
run: yarn format:check
- name: Run spellcheck test
run: yarn test:spellcheck
test-broken-links:
runs-on: ubuntu-latest
needs: [tests]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cypress tests 🧪
uses: cypress-io/github-action@v5
with:
headless: true
config: video=false
browser: chrome
spec: cypress/e2e/broken-links.cy.ts
build: yarn cypress:build
start: yarn start
wait-on: 'http://localhost:3000'
env:
NEXT_PUBLIC_GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }}
- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots-broken-links
path: cypress/screenshots
test-a11y:
runs-on: ubuntu-latest
needs: [tests]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cypress tests 🧪
uses: cypress-io/github-action@v5
with:
headless: true
config: video=false
browser: chrome
spec: cypress/e2e/a11y.cy.ts
build: yarn cypress:build
start: yarn start
wait-on: 'http://localhost:3000'
env:
NEXT_PUBLIC_GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }}
- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots-a11y
path: cypress/screenshots
test-seo:
runs-on: ubuntu-latest
needs: [tests]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cypress tests 🧪
uses: cypress-io/github-action@v5
with:
headless: true
config: video=false
browser: chrome
spec: cypress/e2e/seo.cy.ts
build: yarn cypress:build
start: yarn start
wait-on: 'http://localhost:3000'
env:
NEXT_PUBLIC_GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }}
- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots-seo
path: cypress/screenshots