Bump react from 18.3.1 to 19.0.0 #1648
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: Test | |
on: | |
pull_request: | |
branches: | |
- 'staging' | |
- 'main' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pull-requests: write | |
checks: write | |
issues: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install dependencies | |
run: npm install | |
- name: Install Playwright | |
run: npx playwright install --with-deps | |
- name: Start Storybook | |
run: npm run dev:storybook & | |
- name: Test Storybook | |
run: npm run test:ci | |
update-snapshots: | |
name: Update Snapshots | |
runs-on: ubuntu-latest | |
needs: tests | |
if: always() && contains(needs.tests.result, 'failure') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install && npx playwright install --with-deps | |
- name: Start Storybook | |
run: npm run dev:storybook & | |
- name: Update Snapshots | |
run: npm run test:snapshots | |
- name: Create pr | |
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" | |
git push origin | |
gh pr create --title "Update Snapshots" --body "Automated update of snapshots" --base ${{ github.event.pull_request.head.ref }} --head $BRANCH_NAME --label "snapshots" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH_NAME: update-snapshots/${{ 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 |