Skip to content

Bump @next/bundle-analyzer from 14.0.0 to 14.0.1 #895

Bump @next/bundle-analyzer from 14.0.0 to 14.0.1

Bump @next/bundle-analyzer from 14.0.0 to 14.0.1 #895

Workflow file for this run

name: Test
on:
pull_request:
branches:
- 'staging'
- 'main'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
checks: write
issues: write
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
playwright: [chromium, chromium-mobile, webkit-mobile, chromium-dark, chromium-mobile-dark, webkit-mobile-dark]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci && npx playwright install --with-deps
- name: Run Tests
id: tests
run: npx playwright test --project=${{ matrix.playwright }}
- name: Publish Test Results
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: 'results.xml'
fail_on_failure: false
require_tests: false
job_name: ${{ matrix.playwright }} Results
- name: Update Snapshots
if: ${{ always() && contains(steps.tests.outcome, 'failure') }}
run: npx playwright test --project=${{ matrix.playwright }} --update-snapshots
- name: Create pr
if : ${{ always() && contains(steps.tests.outcome, 'failure') }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git config --global push.autoSetupRemote true
git checkout -b $BRANCH_NAME
git add .
git commit -m "Update Snapshots for ${{ matrix.playwright }}"
git push origin
gh pr create --title "Update Snapshots" --body "Automated update of snapshots for ${{ matrix.playwright }}" --base ${{ github.event.pull_request.head.ref }} --head $BRANCH_NAME --label "snapshots"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: update-snapshots/${{ matrix.playwright}}/${{ github.sha }}
report:
name: Report Test Results
runs-on: ubuntu-latest
needs: tests
if: always()
steps:
- name: Report Test Results
run: |
result="${{ needs.tests.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi