forked from compdemocracy/polis
-
-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (36 loc) · 1.22 KB
/
lighthouse-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
name: lighthouse-ci
on:
push:
branches:
- feature/lighthouse-ci
jobs:
lighthouseci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and start Docker containers
run: |
docker compose -f docker-compose.yml -f docker-compose.test.yml --env-file test.env --profile postgres up -d --build
- name: Health Check the Server http response
uses: jtalk/url-health-check-action@v4
with:
url: http://localhost/api/v3/testConnection
max-attempts: 10
retry-delay: 10s
- name: Setup and install Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
- run: npm install
# insert API interaction here
- name: Create lighthouserc.js using Node.js
run: node generate-lighthouserc.js
- name: Install and run Lighthouse CI
run: |
npm install -g @lhci/[email protected]
lhci autorun
- name: Stop Docker containers
if: always()
run: docker compose -f docker-compose.yml -f docker-compose.test.yml --env-file test.env --profile postgres down