-
Notifications
You must be signed in to change notification settings - Fork 163
49 lines (49 loc) · 1.59 KB
/
ci.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
on:
pull_request:
branches:
- main
name: Test project
jobs:
wait_for_vercel:
name: Wait for Vercel preview
runs-on: ubuntu-latest
outputs:
preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }}
steps:
- name: Wait for Vercel preview deployment to be ready
uses: patrickedqvist/[email protected]
id: waitForVercelPreviewDeployment
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 600
pa11y:
name: Pa11y tests
needs: wait_for_vercel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fixup git permissions
# https://github.com/actions/checkout/issues/766
shell: bash
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/setup-node@v1
with:
node-version: 20.x
- run: npm install -g pa11y-ci --unsafe-perm=true
- run: pa11y-ci --sitemap ${{ needs.wait_for_vercel.outputs.preview_url }}/sitemap.xml --sitemap-find ^/ --sitemap-replace '${{ needs.wait_for_vercel.outputs.preview_url }}/'
htmlproofer:
name: HtmlProofer tests
runs-on: ubuntu-latest
container:
image: timbru31/ruby-node:3.0-16
steps:
- uses: actions/checkout@v3
- name: Fixup git permissions
# https://github.com/actions/checkout/issues/766
shell: bash
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- run: bundle install
- run: chmod -R 777 .
- run: npm ci
- run: npm run build
- run: npm run test-htmlproofer