E2E #1482
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@v4 | |
name: Checkout configuration file | |
with: | |
sparse-checkout: | | |
pa11y-ci.json | |
sparse-checkout-cone-mode: false | |
- uses: narthur/pa11y-ratchet@v2 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
sitemap-url: ${{github.event.deployment_status.target_url}}/sitemap-0.xml | |
find: https://www.audioverse.org | |
replace: ${{github.event.deployment_status.target_url}} | |
include: 'https?:\/\/[\w\.-]+\/en\/' | |
# Ignore contrast-related errors for now | |
ignore: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail,WCAG2AA.Principle1.Guideline1_4.1_4_3.G145.Fail | |
config-path: pa11y-ci.json | |
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 }) |