Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/tests-snapshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update Snapshots

on:
workflow_dispatch:

jobs:
update_snapshots:
runs-on: ubuntu-latest
steps:
- name: Fail if branch is main
if: ${{ github.ref == 'refs/heads/main' }}
run: |
echo "This workflow should not be triggered with workflow_dispatch on main"
exit 1

- name: Checkout
uses: actions/checkout@v4

- name: Prepare
uses: ./.github/actions/prepare

- name: Run tests and update Snapshots
run: npm run test:ci:snapshots

- name: Commit Playwright updated snapshots
uses: EndBug/add-and-commit@v9
if: ${{ github.ref != 'refs/heads/main' }}
with:
add: tests
default_author: github_actions
message: "🤖 update snapshots"
42 changes: 42 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Tests

on:
pull_request:
workflow_dispatch:

jobs:
tests:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Prepare
uses: ./.github/actions/prepare

- name: Run tests
run: npm run test:ci

- name: Upload Playwright report on failure
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 3

- name: Upload Playwright results on failure
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: test-results
path: test-results/
retention-days: 3

may-merge:
needs: ["tests"]
runs-on: ubuntu-latest
steps:
- name: Cleared for merging
run: echo OK
Loading