-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.29 KB
/
Copy pathlighthouse.yml
File metadata and controls
58 lines (51 loc) · 1.29 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
56
57
58
name: Lighthouse CI
on:
pull_request:
paths:
- "site/**"
- ".github/workflows/lighthouse.yml"
push:
branches:
- main
paths:
- "site/**"
- ".github/workflows/lighthouse.yml"
jobs:
lighthouse:
runs-on: ubuntu-latest
defaults:
run:
working-directory: site
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: site/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Start application
run: |
nohup npm run start -- --hostname 127.0.0.1 --port 3000 >/tmp/tipspay-next.log 2>&1 &
for i in {1..60}; do
if curl -fsS http://127.0.0.1:3000/ >/dev/null; then
exit 0
fi
sleep 2
done
cat /tmp/tipspay-next.log
exit 1
- name: Run Lighthouse
uses: treosh/lighthouse-ci-action@v12
with:
urls: |
http://127.0.0.1:3000/
http://127.0.0.1:3000/tr
configPath: ./site/lighthouserc.js
uploadArtifacts: true
runs: 1