-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (45 loc) · 1.45 KB
/
run-tests.yml
File metadata and controls
55 lines (45 loc) · 1.45 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: Run tests
on:
pull_request:
branches: [main]
types: [opened, reopened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install workspace dependencies
run: npm install
working-directory: .
lighthouse:
name: Lighthouse CI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install workspace dependencies
run: npm install
working-directory: .
- name: Install dependencies
run: npm install
working-directory: templates/react-javascript
- name: Build project
run: npm run build
working-directory: templates/react-javascript
- name: lighthouse mobile audit
run: npm run lhci:mobile && npx lhci upload --target=temporary-public-storage
working-directory: templates/react-javascript
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
- name: lighthouse desktop audit
run: npm run lhci:desktop && npx lhci upload --target=temporary-public-storage
working-directory: templates/react-javascript
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}