-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (49 loc) · 1.46 KB
/
Copy pathrun-test.yml
File metadata and controls
55 lines (49 loc) · 1.46 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
name: Build & Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Run test with Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Cypress.io
uses: cypress-io/github-action@v4.2.0
with:
install: npm ci
start: npm run start:cypress:ci
build: npm run build:cypress
wait-on: http://localhost:5000
command: npm test
- name: Codecov upload coverage
uses: codecov/codecov-action@v3.1.1
with:
name: Cypress with Jest Coverage
- name: Lighthouse Score
run: node lighthouse/lighthouse-score.js
- name: Upload lighthouse score svg as gist
uses: exuanbo/actions-deploy-gist@v1
with:
token: ${{ secrets.PAT }}
gist_id: 9b7d7703eec1c6d1352ac9a437aa5f10
file_path: lighthouse/pagespeed.svg
file_type: svg
- name: Upload lighthouse score json as gist
uses: exuanbo/actions-deploy-gist@v1
with:
token: ${{ secrets.PAT }}
gist_id: 431d33b9aa603674249d0561301c93c9
file_path: lighthouse/report.json
file_type: json