-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (64 loc) · 1.68 KB
/
test.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Frontend Test
on:
[pull_request]
jobs:
build:
name: Create test production build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.2.0
- uses: actions/setup-node@v3.5.1
name: Install node 14
with:
node-version: '14.x'
- name: Install dependencies
run: npm ci --only=production
env:
CI: true
- name: Create build
run: npm run build
env:
CI: true
DOMAIN_NAME: preprod.fluentlabs.io
- uses: actions/upload-artifact@master
name: Upload website content
with:
name: gatsby-public
path: public
test:
name: Lint and test frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.2.0
- uses: actions/setup-node@v3.5.1
name: Install node 14
with:
node-version: '14.x'
- name: Install dependencies
run: |
npm ci
env:
CI: true
- name: Lint
run: npm run lint-ci
- name: Unit tests
run: npm run test
- name: End to end tests
run: npm run test:e2e
lighthouse-audit-local:
name: Audit local build with lighthouse
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.2.0
- uses: actions/download-artifact@master
name: Download website content
with:
name: gatsby-public
path: public
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@9.3.1
with:
configPath: './lighthouserc_local.json'
uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage