Skip to content

Commit

Permalink
Sets up Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarstairs-scottlogic committed Nov 29, 2023
1 parent 84d1e31 commit 211e593
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/check-a11y-of-changed-content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,20 @@ jobs:
- name: Install NPM dependencies
run: npm ci

- name: Setup Chrome
uses: browser-actions/setup-chrome@v1
id: setup-chrome

- name: Log Chrome setup info
run: |
echo Installed chromium version: ${{ steps.setup-chrome.outputs.chrome-version }}
${{ steps.setup-chrome.outputs.chrome-path }} --version
- name: Wait for blog to be running
run: npx wait-on http://127.0.0.1:4000 --timeout 60000

- name: Find out what’s running on which ports
run: sudo netstat -lp

- name: Run pa11y (for debugging)
run: npx pa11y https://blog.scottlogic.com --debug

- name: Run pa11y-ci
run: npx pa11y-ci
run: CHROMIUM_BIN=$(which chrome) npx pa11y-ci
7 changes: 6 additions & 1 deletion .pa11yci.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
const relativeUrls = require('./pa11y-ci-urls');

const chromiumBin = process.env.CHROMIUM_BIN;
if (!chromiumBin) {
throw new Error('CHROME_BIN environment variable is not set');
}

const baseUrl = 'http://localhost:4000';

module.exports = {
defaults: {
concurrency: 1,
chromeLaunchConfig: {
executablePath: '/usr/bin/google-chrome',
executablePath: chromiumBin,
},
ignore: [
'WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail', // colour contrast, which is a known issue
Expand Down

0 comments on commit 211e593

Please sign in to comment.