Skip to content

💚 Update worklow to test accessibility #102

💚 Update worklow to test accessibility

💚 Update worklow to test accessibility #102

Workflow file for this run

on:
pull_request:
branches:
- main
paths-ignore:
- "README.md"
- "SECURITY.md"
- "LICENCE"
- "GUIDE.md"
- "CONTRIBUTING.md"
- "CODE_OF_CONDUCT.md"
jobs:
compile-themes:
runs-on: ubuntu-latest
name: Compile themes
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install npm dependencies
run: |
npm ci
npm install -g sass
shell: bash
working-directory: ./chimera-css
- name: Compile sass
run: |
sass src/themes/chimera.scss build/chimera.css
sass src/themes/chimera-dark.scss build/chimera-dark.css
sass src/themes/chimera-golden.scss build/chimera-golden.css
sass src/themes/chimera-autumn.scss build/chimera-autumn.css
sass src/themes/chimera-plain.scss build/chimera-plain.css
sass src/themes/chimera-blues.scss build/chimera-blues.css
sass src/themes/chimera-nightsky.scss build/chimera-nightsky.css
shell: bash
working-directory: ./chimera-css
accessibility-testing:
runs-on: ubuntu-latest
name: Testing accessibility
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Intall npm dependencies
run: |
npm install -g sass
shell: bash
working-directory: ./apps/demo
- name: Install GitHub CLI
run: sudo apt-get install -y gh
- name: Run Pa11y accessibility tests and capture output
id: pa11y
run: |
pa11y-ci --config ./pa11yci.json > pa11y-output.txt
cat pa11y-output.txt
- name: Post Pa11y results to PR
if: success() || failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr comment ${{ github.event.pull_request.number }} --body "$(cat pa11y-output.txt)"