Skip to content

Commit

Permalink
ci: Run accessibility tests (#493)
Browse files Browse the repository at this point in the history
Fixes #315
  • Loading branch information
kesara committed Aug 13, 2024
1 parent cbbde61 commit a634369
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 5 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/accessibility-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run accessibility tests
on:
push:
branches:
- '*'
schedule:
- cron: '0 0 * * *'

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Download latest DB / media dump
env:
DEBIAN_FRONTEND: noninteractive
AWS_ACCESS_KEY_ID: ${{ secrets.DO_SPACES_DEV_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DO_SPACES_DEV_ACCESS_KEY }}
run: |
aws s3 cp --quiet --endpoint-url=${{ secrets.DO_SPACES_DEV_ENDPOINT }} s3://wagtail/ietfa.torchbox.latest.gz ietfa.torchbox.latest.gz
aws s3 cp --quiet --endpoint-url=${{ secrets.DO_SPACES_DEV_ENDPOINT }} s3://wagtail/media.tgz media.tgz
- name: Unarchive media files
run: |
mkdir -p ./media
tar -xzf media.tgz -C media
- name: Docker Compose up
run: docker compose up --build -d

- name: Wait for services to be up
run: sleep 10

- name: Run accessibility tests
run: docker exec www-frontend-1 sh -c 'yarn test $APP_SERVER_URL'
5 changes: 2 additions & 3 deletions .github/workflows/ci-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
branches:
- main
- feat/modern-footer
pull_request:
branches:
- '*'
Expand All @@ -14,10 +13,10 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Docker build app-test
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
Expand Down
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.7"

services:
application:
restart: on-failure
Expand Down Expand Up @@ -27,6 +25,10 @@ services:
target: frontend
volumes:
- ".:/app"
environment:
APP_SERVER_URL: "http://application:8000"
depends_on:
- application

database:
restart: on-failure
Expand Down

0 comments on commit a634369

Please sign in to comment.