-
Notifications
You must be signed in to change notification settings - Fork 11
63 lines (60 loc) · 1.79 KB
/
tests-axe.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
name: Accessibility tests
on:
workflow_dispatch:
pull_request:
paths-ignore:
- ".github/workflows/**"
- "*.md"
- "integration/**"
- AUTHORS
concurrency:
group: ci-${{ github.ref }}-a11y
cancel-in-progress: true
env:
MIX_ENV: dev
MBTA_API_BASE_URL: ${{ secrets.MBTA_API_BASE_URL }}
MBTA_API_KEY: ${{ secrets.MBTA_API_KEY }}
jobs:
axe_test:
name: Run accessibility tests against Docker container
timeout-minutes: 30
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
cache: npm
cache-dependency-path: package-lock.json
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
mask-aws-account-id: true
- run: npm install --ignore-scripts
- run: npx playwright install --with-deps chromium
- run: cp .env.template .env # The docker compose expects an .env file
- name: docker compose up
run: docker compose --file deploy/dev.yml up --build --detach --wait
- run: npx playwright test axe
env:
CI: true
HOME: /root
- uses: actions/upload-artifact@v4
if: always()
with:
name: axe-report-${{ github.sha }}
path: playwright-report
retention-days: 30
- name: show docker container logs
run: docker compose --file deploy/dev.yml logs
if: ${{ failure() }}
- name: docker compose down
if: always()
run: docker compose --file deploy/dev.yml down