E2E tests for medication and lab order workflows. #12
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: C2C E2E Tests | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Choose test environment' | |
required: true | |
default: 'dev' | |
type: choice | |
options: | |
- dev | |
- uat | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.repository }} | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Cache dependencies | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn install | |
- name: Install Playwright browsers | |
run: npx playwright install chromium --with-deps | |
- name: Run E2E tests | |
env: | |
E2E_TEST_ENVIRONMENT: '${{ github.event.inputs.environment }}' | |
run: npm run e2e-tests-c2c | |
- name: Upload report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |