-
-
Notifications
You must be signed in to change notification settings - Fork 50
67 lines (53 loc) · 1.58 KB
/
ci.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Coderadio-client ci
on: [push, pull_request]
jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout Source Files
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Install modules
run: npm ci
- name: Run ESLint
run: npm run lint
cypress-run:
name: Cypress Test
# Netlify deploys onto Ubuntu 20.04, so we should test on that os:
runs-on: ubuntu-20.04
strategy:
matrix:
browsers: [chrome, firefox]
node-version: [20.x]
steps:
- name: Set Action Environment Variables
run: |
echo "CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }}" >> $GITHUB_ENV
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
echo "CYPRESS_INSTALL_BINARY=6.0.0" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Cypress run
uses: cypress-io/github-action@v2
with:
browser: ${{ matrix.browsers }}
build: npm run build
start: npm start
wait-on: http://localhost:3001
wait-on-timeout: 1200
unit-test:
name: Unit Test
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout Source Files
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Install modules
run: npm ci
- name: Run tests
run: npm test