From c903756329075e8a51e223f34ca461d5711bd3ec Mon Sep 17 00:00:00 2001 From: Tony Lea Date: Sun, 19 May 2024 11:44:34 -0400 Subject: [PATCH] trying new updated tests --- .github/workflows/tests.yml | 21 +++++++++++++++++++++ lighthouserc.json | 20 ++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 lighthouserc.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 093455d..0a6b61d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -110,3 +110,24 @@ jobs: - name: Run Tests run: ./vendor/bin/pest working-directory: ./laravel_app + + # This is where we start the Lighthouse tests + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install Lighthouse CI + run: npm install -g @lhci/cli@0.7.x + + - name: Start Laravel server + run: php artisan serve --host=0.0.0.0 --port=8080 & + working-directory: ./laravel_app + + - name: Wait for server to be up + run: sleep 15 + + - name: Run Lighthouse CI + run: lhci autorun + working-directory: ./laravel_app \ No newline at end of file diff --git a/lighthouserc.json b/lighthouserc.json new file mode 100644 index 0000000..ec36751 --- /dev/null +++ b/lighthouserc.json @@ -0,0 +1,20 @@ +{ + "ci": { + "collect": { + "url": [ + "http://localhost:8080/login", + "http://localhost:8080/register" + ], + "numberOfRuns": 3 + }, + "assert": { + "assertions": { + "categories:accessibility": ["error", {"minScore": 0.9}] + } + }, + "upload": { + "target": "temporary-public-storage" + } + } + } + \ No newline at end of file