[feat] add microsite accessibility workflow, add microsite lighthouse config

Signed-off-by: Jithen Shriyan <shriyanjithen@gmail.com>
This commit is contained in:
Jithen Shriyan
2024-01-20 20:47:55 -05:00
parent 0576cdc0d6
commit a29a9f1f6c
6 changed files with 141 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 }}