Skip to content

Commit

Permalink
fixup! chore(ci): set up Lighthouse auditing in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Restioson committed Oct 22, 2024
1 parent 3a6b5e7 commit 5cb8006
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@ jobs:
env:
DJANGO_SETTINGS_MODULE: app.settings
DATABASE_URL: postgres://sadilar:sadilar@localhost:5432/term_db
- name: TEST
if: always()
run: |
ls -al
ls -al app/
- name: Archive Lighthouse results
if: always() # Ensure results are uploaded on failure too
uses: actions/upload-artifact@v4
Expand Down
9 changes: 2 additions & 7 deletions app/lighthouserc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ module.exports = {
collect: {
// We don't care about variable page performance metrics in CI - just static asserts
numberOfRuns: 1,

// If we don't set PYTHONUNBUFFERED=1, then the ready message is never detected by lhci
// We also need to set DEBUG='' to disable the debug toolbar and make the page more like what we run in
// production. This, in turn, necessitates setting ALLOWED_HOSTS

startServerCommand: "./entrypoint.sh",
url: [
"http://localhost:8000",
Expand All @@ -18,11 +13,11 @@ module.exports = {
"http://localhost:8000/languages/",
"http://localhost:8000/subjects/"
]
}, // TODO DEBUG=True now disable this !!! should not use .env.testing
},
assert: {
"preset": "lighthouse:recommended",
"assertions": {
// Gunicorn doesn't do this
// Gunicorn doesn't do this, but the reverse proxy in front of it does
"uses-text-compression": false,

// We don't think these are worth worrying about for now
Expand Down

0 comments on commit 5cb8006

Please sign in to comment.