Run Docker Tests and Upload Results #31
This file contains 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: Run Docker Tests and Upload Results | |
on: | |
workflow_dispatch: | |
inputs: | |
A11Y_CHECKOUT: | |
description: 'Checkout a specific purple a11y branch' | |
required: false | |
default: 'git+https://github.com/GovTechSG/purple-a11y.git#master' | |
push: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v1 | |
- name: Run start_docker.sh script | |
run: | | |
chmod +x ./shell_scripts/start_docker.sh | |
./shell_scripts/start_docker.sh "${{ github.event.inputs.A11Y_CHECKOUT || 'git+https://github.com/GovTechSG/purple-a11y.git#master' }}" | |
continue-on-error: true | |
- name: Run stop_docker.sh script | |
run: | | |
chmod +x ./shell_scripts/stop_docker.sh | |
./shell_scripts/stop_docker.sh | |
continue-on-error: true | |
- name: Zip Cypress reports folder | |
run: zip -r cypress-reports.zip ./cypress | |
continue-on-error: true | |
- name: Upload Cypress reports as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cypress-reports | |
path: cypress-reports.zip |