Playwright Tests #5299
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 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
if: github.event.deployment_status.state == 'success' && !contains(github.event.deployment_status.target_url, 'storybook') && !contains(github.event.deployment_status.target_url, 'vitejs') | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:v1.40.1-jammy | |
timeout-minutes: 25 | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
steps: | |
- uses: actions/checkout@v4.1.1 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4.0.0 | |
with: | |
node-version-file: ".nvmrc" | |
registry-url: "https://registry.npmjs.org" | |
always-auth: true | |
cache: npm | |
- name: Cache playwright binaries | |
uses: actions/cache@v3 | |
id: playwright-cache | |
with: | |
path: | | |
~/.cache/ms-playwright | |
key: cache-playwright-linux-1.40.1 | |
- name: Cache node_modules | |
id: cache-node_modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
**/node_modules | |
node_modules | |
key: node_modules-${{ hashFiles('package-lock.json') }} | |
restore-keys: node_modules | |
- name: Install npm dependencies | |
if: steps.cache-node_modules.outputs.cache-hit != 'true' | |
run: npm ci | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
- name: Install Playwright Browsers | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: npm run playwright | |
env: | |
BASEURL: "${{ github.event.deployment_status.target_url }}" | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} |