Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E | |
on: [deployment_status] | |
jobs: | |
accessibility: | |
if: github.event.deployment_status.state == 'success' | |
# WORKAROUND: https://github.com/pa11y/pa11y/issues/651 | |
runs-on: ubuntu-20.04 | |
permissions: | |
checks: read | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16.15.0 | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm ci | |
- name: Scan for issues | |
run: | | |
npx pa11y-ci \ | |
--sitemap ${{github.event.deployment_status.target_url}}/sitemap-0.xml \ | |
--sitemap-find https://www.audioverse.org \ | |
--sitemap-replace ${{github.event.deployment_status.target_url}} \ | |
--sitemap-exclude 'https?:\/\/[\w\.-]+\/(?!en)\w\w\/' | |
- name: Add comment | |
if: always() | |
uses: actions/github-script@v5 | |
env: | |
BODY_PREFIX: '<!-- pa11y-ci results -->' | |
with: | |
script: | | |
const script = require('./.github/workflows/scripts/pa11y-ci.js') | |
await script({ context, core, github }) | |
- name: Upload results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: pa11y-results | |
path: reports | |
lighthouse: | |
if: github.event.deployment_status.state == 'success' | |
runs-on: ubuntu-latest | |
permissions: | |
checks: read | |
pull-requests: write | |
steps: | |
# WORKAROUND: https://github.com/treosh/lighthouse-ci-action/issues/21 | |
- uses: actions/checkout@v2 | |
- name: Delete default configuration | |
run: rm .lighthouserc.yaml | |
- name: Run Lighthouse | |
uses: treosh/lighthouse-ci-action@v9 | |
id: lighthouse | |
with: | |
urls: | | |
${{github.event.deployment_status.target_url}}/ | |
${{github.event.deployment_status.target_url}}/en | |
${{github.event.deployment_status.target_url}}/es | |
${{github.event.deployment_status.target_url}}/en/discover | |
${{github.event.deployment_status.target_url}}/en/teachings/all/page/1 | |
${{github.event.deployment_status.target_url}}/en/teachings/300 | |
${{github.event.deployment_status.target_url}}/en/bibles | |
${{github.event.deployment_status.target_url}}/en/presenters/1309/amanda-anguish | |
runs: 3 | |
uploadArtifacts: true | |
temporaryPublicStorage: true | |
- name: Add comment | |
uses: actions/github-script@v5 | |
env: | |
LIGHTHOUSE_LINKS: ${{ steps.lighthouse.outputs.links }} | |
with: | |
script: | | |
const script = require('./.github/workflows/scripts/lighthouse.js') | |
await script({ context, core, github }) |