Asap 178 accessibility audit #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| 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: 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: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Firefox and GeckoDriver | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y firefox-esr wget | |
| sudo rm -rf /var/lib/apt/lists/* | |
| wget -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux64.tar.gz | |
| sudo tar -xzf /tmp/geckodriver.tar.gz -C /usr/local/bin/ | |
| sudo chmod +x /usr/local/bin/geckodriver | |
| rm /tmp/geckodriver.tar.gz | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r python_components/accessibility_scan/requirements.txt | |
| - name: Run tests | |
| env: | |
| RAILS_ENV: test | |
| DATABASE_URL: postgres://postgres:postgres@localhost:5432/access_pdf_test | |
| run: python python_components/accessibility_scan/main.py |