Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Run accessibility tests #493

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
Loading