Skip to content

Asap 178 accessibility audit #6

Asap 178 accessibility audit

Asap 178 accessibility audit #6

name: Accessibility Scan
on:
pull_request:
branches: [ main, dev ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup Firefox
uses: browser-actions/setup-firefox@v1
- name: Setup GeckoDriver
uses: browser-actions/setup-geckodriver@v1
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Compile CSS and JS
run: |
npm install -g [email protected] [email protected]
yarn install
yarn build
yarn build:css
- name: Set up database
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/access_pdf_test
run: |
bundle exec rails db:create
bundle exec rails db:migrate
bundle exec rails db:setup
- name: Run Rails app
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/access_pdf_test
run: bin/rails server -e test&
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r python_components/accessibility_scan/requirements.txt
- name: Run Accessibility Scan
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/access_pdf_test
run: python python_components/accessibility_scan/main.py