diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 24ebbca..e04c6c5 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -16,11 +16,15 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 + - uses: actions/setup-node@v3 + with: + node-version: 18 - name: Install Dependencies run: | python -m pip install --upgrade pip pip install -r requirements-test.txt sudo apt-get install -y gettext + npm install -g @lhci/cli@0.14.x - name: Run linting tools run: | cd app/ @@ -55,3 +59,7 @@ jobs: run: | cd app/ python manage.py check + - name: Run Lighthouse + run: | + cd app/ + lhci autorun diff --git a/.gitignore b/.gitignore index 168936e..cfb3489 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,6 @@ app/media/ /logging/ /pdf_uploads/ /pdf_upload_completed/ + +# Generated Lighthouse CI artifacts +.lighthouseci/ diff --git a/app/lighthouserc.json b/app/lighthouserc.json new file mode 100644 index 0000000..7b6de37 --- /dev/null +++ b/app/lighthouserc.json @@ -0,0 +1,18 @@ +{ + "scripts": { + "serve:lhci": "python manage.py runserver localhost:3000" + }, + "ci": { + "collect": { + "url": [ + "http://localhost:3000", + "http://localhost:3000/search/", + "http://localhost:3000/institutions/", + "http://localhost:3000/projects/", + "http://localhost:3000/documents/", + "http://localhost:3000/languages/", + "http://localhost:3000/subjects/" + ] + } + } +}