Merge pull request #22406 from jithenms/feature/add-microsite-accessibility-check

[feat] Add microsite accessibility CI workflow
This commit is contained in:
Ben Lambert
2024-02-07 14:04:48 +01:00
committed by GitHub
6 changed files with 143 additions and 3 deletions
@@ -7,7 +7,7 @@ on:
branches: [master]
paths-ignore:
- 'lighthouserc.js'
- '.github/workflows/verify_accessibility_core.yml'
- '.github/workflows/verify_accessibility.yml'
- 'plugins/catalog/src/**'
- 'plugins/catalog-react/src/**'
- 'plugins/techdocs/src/**'
+2 -2
View File
@@ -1,11 +1,11 @@
name: Accessibility
on:
# NOTE: If you change these you must update verify_accessibility_core-noop.yml as well
# NOTE: If you change these you must update verify_accessibility-noop.yml as well
pull_request:
branches: [master]
paths:
- 'lighthouserc.js'
- '.github/workflows/verify_accessibility_core.yml'
- '.github/workflows/verify_accessibility.yml'
- 'plugins/catalog/src/**'
- 'plugins/catalog-react/src/**'
- 'plugins/techdocs/src/**'
@@ -0,0 +1,31 @@
# NO-OP placeholder that always passes for other paths
# This is here so that we're able to set the status check as required
name: Microsite Accessibility
on:
pull_request:
branches: [master]
paths-ignore:
- '.github/workflows/verify_microsite_accessibility.yml'
- 'microsite/scripts/**'
- 'microsite/src/**'
- 'microsite/data/**'
- 'microsite/blog/**'
- 'microsite/static/**'
- 'beps/**'
- 'mkdocs.yml'
- 'docs/**'
permissions:
contents: read
jobs:
noop:
name: Microsite Accessibility
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- run: echo NOOP
@@ -0,0 +1,40 @@
name: Microsite Accessibility
on:
# NOTE: If you change these you must update verify_microsite_accessibility-noop.yml as well
pull_request:
branches: [master]
paths:
- '.github/workflows/verify_microsite_accessibility.yml'
- 'microsite/**'
- 'beps/**'
- 'mkdocs.yml'
- 'docs/**'
jobs:
lhci:
name: Microsite Accessibility
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- uses: actions/checkout@v4.1.1
- name: Use Node.js 18.x
uses: actions/setup-node@v4.0.1
with:
node-version: 18.x
- name: top-level install
run: yarn install --immutable
- name: yarn install
run: yarn install --immutable
working-directory: microsite
- name: run Lighthouse CI
run: |
yarn dlx @lhci/cli@0.11.x --config=microsite/lighthouserc.js autorun
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}