Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/lighthouse-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Lighthouse CI

on:
push:
pull_request:
workflow_dispatch:

jobs:
lhci:
runs-on: ubuntu-latest
strategy:
max-parallel: 4

steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Prepare secrets
# we could use poetry run python manage.py createsecrets -o .env
# but this would require us to:
# 1. set up Python
# 2. install Poetry
# 3. install dependencies
# instead, we copy the example debug config file to save CI resources
run: cp .env.local .env

- name: Build Docker images
run: docker-compose -f docker-compose.yml -f docker-compose.dev.yml build --parallel

- name: Run Lighthouse CI
run: |
npm install -g @lhci/cli@0.6.1
lhci autorun
12 changes: 12 additions & 0 deletions lighthouserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
ci: {
collect: {
url: ['http://localhost:8000/'],
startServerCommand: 'docker-compose -f docker-compose.yml -f docker-compose.prod.yml up',
startServerReadyTimeout: 60000,
},
upload: {
target: 'temporary-public-storage',
},
},
};