Skip to content

Commit

Permalink
Updates to unlighthouse config. Add workflow action.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouder committed Oct 31, 2023
1 parent 386510b commit c1d2d9c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 7 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/accessibility-testing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Run Accessibility Testing

on:
pull_request:
branches: [main]

jobs:
demo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install Dependencies
run: npm add -g @unlighthouse/cli puppeteer

- name: Run Tests
run: unlighthouse-ci --config unlighthouse.config.ts --build-static --reporter jsonExpanded
27 changes: 20 additions & 7 deletions unlighthouse.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { defineConfig } from 'unlighthouse';

export default defineConfig({
// auth: {
// username: '',
// password: '',
// },
ci: {
budget: {
performance: 90,
Expand All @@ -14,14 +10,31 @@ export default defineConfig({
},
},
debug: true,
routerPrefix: '/comet-starter',
// hooks: {
// async authenticate(page) {
// // login to the page
// await page.goto('http://some-auth-provider');
// const emailInput = await page.$('input[type="text"]');
// await emailInput?.type('some-user');
// const passwordInput = await page.$('input[type="password"]');
// await passwordInput?.type('some-password');
// await Promise.all([
// // eslint-disable-next-line @typescript-eslint/no-explicit-any
// page.$eval('#login-form', (form: any) => form.submit()),
// page.waitForNavigation(),
// ]);
// },
// },
puppeteerClusterOptions: {
maxConcurrency: 1,
},
puppeteerOptions: {
// headless: false,
// slowMo: 50,
},
scanner: {
device: 'desktop',
skipJavascript: false,
},
site: 'http://localhost:8080',
// urls: ['/', '/signin', '/dashboard'],
site: 'https://metrostar.github.io/comet-starter/',
});

0 comments on commit c1d2d9c

Please sign in to comment.