Skip to content

Tests E2E

Tests E2E #2

Workflow file for this run

name: Tests
on:
deployment_status:
jobs:
tests:
name: Tests E2E
timeout-minutes: 60
runs-on: ubuntu-latest
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success'
steps:
- name: πŸš€ Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: 🎯 Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: πŸ—οΈ Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- name: πŸ“¦ Setup pnpm - Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: false
- name: πŸ“¦ Setup pnpm - Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: πŸ“¦ Setup pnpm - Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: πŸ“¦ Install dependencies
run: pnpm install
- name: 🌐 Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: 🎭 Run Playwright tests
run: pnpm test:e2e
env:
BASE_URL: ${{ github.event.deployment_status.target_url }}
- name: πŸ“Š Upload Playwright Report
uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30