Skip to content

fix(frontend): span cannot be a child of option #2721

fix(frontend): span cannot be a child of option

fix(frontend): span cannot be a child of option #2721

name: Update E2E Snapshots
on:
push:
branches:
- main
pull_request:
types: [ opened, synchronize, labeled ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
oisy-backend-wasm:
runs-on: ubuntu-24.04
if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-e2e-snapshots') }}
steps:
- name: Checkout
if: ${{ github.event_name != 'pull_request' }}
uses: actions/checkout@v4
- name: Checkout for pull request
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GIX_CREATE_PR_PAT }}
- name: Build oisy-backend WASM
uses: ./.github/actions/oisy-backend
update_snapshots:
runs-on: ${{ matrix.os }}
needs: oisy-backend-wasm
strategy:
matrix:
os: [ubuntu-24.04, macos-14]
if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-e2e-snapshots') }}
steps:
- name: Fail if branch is main
if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }}
run: |
echo "This workflow should not be triggered with workflow_dispatch on main"
exit 1
- name: Create GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_AUTOMATION_BOT_PUBLIC_APP_ID }}
private-key: ${{ secrets.PR_AUTOMATION_BOT_PUBLIC_PRIVATE_KEY }}
- name: Checkout
if: ${{ github.event_name != 'pull_request' }}
uses: actions/checkout@v4
- name: Checkout for pull request
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ steps.app-token.outputs.token }}
- name: Download WASM artifact
uses: actions/download-artifact@v4
with:
name: backend.wasm.gz
- name: Prepare macOS
if: runner.os == 'macOS'
uses: ./.github/actions/prepare-macos
- name: Set Environment Variables
run: echo "VITE_ETHERSCAN_API_KEY=${{ secrets.VITE_ETHERSCAN_API_KEY_E2E }}" >> $GITHUB_ENV
- name: Deploy the backend
uses: ./.github/actions/deploy-backend
- name: Prepare
uses: ./.github/actions/prepare
- name: Run Playwright tests
run: npm run e2e:snapshots
- name: Commit Playwright updated snapshots
uses: EndBug/add-and-commit@v9
if: ${{ github.ref != 'refs/heads/main' }}
with:
add: e2e
default_author: github_actions
message: "🤖 Update E2E snapshots"
- name: Stage Changes
if: github.ref == 'refs/heads/main'
run: git add .
- name: Check for Changes
if: github.ref == 'refs/heads/main'
run: |
if ! git diff --cached --quiet; then
echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
MODIFIED_FILES=$(git diff --cached --name-only)
echo "MODIFIED_FILES<<EOF" >> $GITHUB_ENV
echo "$MODIFIED_FILES" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
fi
- name: Create Pull Request (if changes and on main)
if: github.ref == 'refs/heads/main' && env.CHANGES_DETECTED == 'true'
uses: ./.github/actions/create-pr
with:
token: ${{ secrets.GIX_CREATE_PR_PAT }}
branch: bot-e2e-update-snapshots
title: 'chore(e2e): Update Playwright E2E Snapshots'
body: |
The following E2E snapshots have been updated:
```
${{ env.MODIFIED_FILES }}