-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (72 loc) · 2.01 KB
/
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
69
70
71
72
name: Tests
on: push
jobs:
job1:
name: Create Build
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Set Font Awesome token and dry run installation
run: |
npm config set '@fortawesome:registry=https://npm.fontawesome.com/'
npm config set '//npm.fontawesome.com/:_authToken' "${{ secrets.FONTAWESOME_TOKEN }}"
npm install @fortawesome/fontawesome-pro --dry-run
- name: Install dependencies
run: npm ci
- name: Create test build
run: npm run test-build
- name: Cache test build
uses: actions/cache@v4
with:
path: dist
key: run-id-${{ github.run_id }}
job2:
name: Accessibility Audit
needs: job1
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Retrieve cached test build
uses: actions/cache@v4
with:
path: dist
key: run-id-${{ github.run_id }}
- name: Run pa11y-ci test
run: npm run start-pa11y
job3:
name: Visual Regression
needs: job1
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Retrieve cached test build
uses: actions/cache@v4
with:
path: dist
key: run-id-${{ github.run_id }}
- name: Run percy test
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
run: npm run start-percy