✨ E2E: Introduce Playwright #1050
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
on: | |
pull_request: | |
types: [opened, reopened, synchronize, ready_for_review] | |
workflow_dispatch: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
environment: Preview | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: exactly | |
SENTRY_PROJECT: webapp | |
SENTRY_ENVIRONMENT: development | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: npm | |
- run: npm ci | |
- run: npm run lint | |
- run: npm run build | |
- run: npx unimported | |
e2e: | |
if: github.event_name != 'pull_request' || !github.event.pull_request.draft | |
runs-on: ubuntu-latest | |
environment: Test | |
needs: check | |
env: | |
NEXT_PUBLIC_SOCKET_API_KEY: ${{ secrets.NEXT_PUBLIC_SOCKET_API_KEY }} | |
CYPRESS_TENDERLY_ACCESS_KEY: ${{ secrets.TENDERLY_ACCESS_KEY }} | |
CYPRESS_TENDERLY_PROJECT: exactly | |
CYPRESS_TENDERLY_USER: exactly | |
NODE_OPTIONS: '--max_old_space_size=4096' | |
steps: | |
- run: | | |
sudo DEBIAN_FRONTEND=noninteractive apt-get update | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: npm | |
- run: npm ci --audit false | |
# - uses: cypress-io/github-action@v5 | |
# with: | |
# browser: chrome | |
# headed: false | |
# install: false | |
# record: false | |
# start: npm run start:e2e | |
# wait-on: 'http://127.0.0.1:3000' | |
# wait-on-timeout: 300000 | |
# command: npm run test | |
# - uses: actions/upload-artifact@v3 | |
# if: failure() | |
# with: | |
# name: e2e-artifacts | |
# path: | | |
# tests/e2e/screenshots |