Skip to content

Use e+ notation for very large number #2018

Use e+ notation for very large number

Use e+ notation for very large number #2018

Workflow file for this run

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://doronbancor/playwright-imagemagick:latest # Updated to use your Docker image
options: --platform linux/amd64 # Specify platform
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # Fetch the last 2 commits for comparison
- 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:
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' && !startsWith(github.event.head_commit.message, '[CI]')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # Ensure the last 2 commits are fetched for diff
- uses: actions/download-artifact@master
with:
name: screenshots
path: e2e/screenshots
- name: Compare Modified Screenshots
id: compare-screenshots
run: |
chmod +x $GITHUB_WORKSPACE/scripts/compare_screenshots.sh # Add execute permissions
$GITHUB_WORKSPACE/scripts/compare_screenshots.sh # Execute the script
- 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