-
Notifications
You must be signed in to change notification settings - Fork 22
68 lines (61 loc) · 2.06 KB
/
accessibility_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Accessibility Tests
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * 0' # Run every Sunday at 3am
jobs:
pally:
name: Pa11y accessibility tests
env:
RAILS_ENV: test
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare application environment
uses: ./.github/actions/prepare-app-env
with:
skip-ruby: true
- run: npm install
- name: Run Pa11y accessibility tests against QA sitemap pages
run: |
npm install -g pa11y-ci
pa11y-ci --sitemap https://qa.teaching-vacancies.service.gov.uk/sitemap.xml
axe:
name: Axe accessibility tests
env:
RAILS_ENV: test
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare application environment
uses: ./.github/actions/prepare-app-env
with:
skip-ruby: true
- run: npm install
- name: Run Axe accessibility tests against QA sitemap pages
run: |
npm install -g @axe-core/cli sitemap-urls
# Gets all urls from sitemap in an array
urls=($(curl https://qa.teaching-vacancies.service.gov.uk/sitemap.xml | sitemap-urls))
# Runs axe against each url from the sitemap
axe $(for url in "${urls[@]}"; do echo $url, ; done;) --exit
lighthouse:
name: Lighthouse tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare application environment
uses: ./.github/actions/prepare-app-env
with:
skip-ruby: true
- run: npm install
- name: run Lighthouse Performance, Accessibility, Best Practices, SEO, and PWA tests
run: |
npm install -g @lhci/cli
lhci autorun \
--collect.url=https://qa.teaching-vacancies.service.gov.uk \
--collect.url=https://qa.teaching-vacancies.service.gov.uk/jobs \
--collect.url=https://qa.teaching-vacancies.service.gov.uk/schools \