[Overlapping] Enable undercut #1346
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: E2E Tests | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize, ready_for_review] | |
jobs: | |
e2e: | |
name: 'E2E Tests' | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
container: | |
image: docker://mcr.microsoft.com/playwright:v1.43.0-jammy | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install build-essential | |
run: apt-get update && apt-get install -y build-essential | |
- name: Install dependencies | |
run: yarn | |
- name: Install Playwright browsers and run Playwright tests | |
run: yarn e2e | |
env: | |
VITE_CHAIN_RPC_URL: ${{ secrets.VITE_CHAIN_RPC_URL }} | |
TENDERLY_ACCOUNT: bancor | |
TENDERLY_PROJECT: carbon-test-forks | |
TENDERLY_ACCESS_KEY: ${{ secrets.VITE_TENDERLY_ACCESS_KEY }} | |
CI: true | |
DRAFT: ${{ github.event.pull_request.draft || github.base_ref != 'main' }} | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 3 | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: screenshots | |
path: e2e/screenshots | |
retention-days: 3 | |
commit-screenshots: | |
name: 'Commit Screenshots' | |
needs: e2e | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.draft == false && github.base_ref == 'main' | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push (see auto-commit below) | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@master | |
with: | |
name: screenshots | |
path: e2e/screenshots | |
- name: Import GPG key | |
id: import-gpg | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '[CI] Update Screenshots' | |
commit_user_name: ${{ steps.import-gpg.outputs.name }} | |
commit_user_email: ${{ steps.import-gpg.outputs.email }} | |
- uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: screenshots |