Skip to content

ci(dashboard): add accessibility validation to the pipeline #16

ci(dashboard): add accessibility validation to the pipeline

ci(dashboard): add accessibility validation to the pipeline #16

Workflow file for this run

name: CI
on:
pull_request:
jobs:
frontend:
name: Frontend (lint, typecheck, test)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
working-directory: dashboard
run: npm ci
- name: Run lint
working-directory: dashboard
run: npm run lint
- name: TypeScript check (build)
working-directory: dashboard
run: npm run build
- name: Run tests
working-directory: dashboard
run: npm test --silent
accessibility:
name: Accessibility (axe audit)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
cache-dependency-path: dashboard/package-lock.json
- name: Install dependencies
working-directory: dashboard
run: npm ci
# Audits key UI components with axe-core. Fails the build on critical
# violations; all findings are written to dashboard/a11y-report.md.
- name: Run accessibility audit
working-directory: dashboard
run: npm run test:a11y
- name: Upload accessibility report
if: always()
uses: actions/upload-artifact@v4
with:
name: accessibility-report
path: dashboard/a11y-report.md
if-no-files-found: warn
rust:
name: Rust (fmt check, tests)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Check formatting
working-directory: contract
run: |
rustup component add rustfmt || true
cargo fmt --all -- --check
- name: Run tests
working-directory: contract
run: cargo test --workspace --all-features --verbose