Playwright Tests #698
Workflow file for this run
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: Playwright Tests | |
on: | |
deployment_status: | |
jobs: | |
test: | |
timeout-minutes: 15 | |
runs-on: [self-hosted, asg] | |
container: | |
image: public.ecr.aws/docker/library/node:18.19.0-bullseye | |
# Certs added for the self hosted runner | |
env: | |
NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt | |
ports: | |
- 80 | |
volumes: | |
- my_docker_volume:/home/runner | |
- /etc/ssl/certs:/etc/ssl/certs | |
if: github.event.deployment_status.state == 'success' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Setup Yarn | |
run: | | |
corepack enable | |
corepack install -g --cache-only .yarn/releases/corepack.tgz | |
- name: Install dependencies | |
run: | | |
yarn | |
- name: Install Playwright | |
run: | | |
yarn playwright install --with-deps | |
- name: Run Playwright tests | |
run: | | |
SITE_URL=${{ github.event.deployment_status.environment_url }} yarn test:playwright | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: ./playwright/test-report/ | |
retention-days: 30 |