Skip to content
Merged
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
26 changes: 25 additions & 1 deletion .github/workflows/run-tests-example-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@ name: Run tests for example apps

on:
workflow_dispatch:
inputs:
update-screenshots:
description: "Update screenshots"
required: false
default: "false"

# TODO: Enable this when we test this workflow manually
# pull_request:
# branches:
# - develop

permissions:
contents: write

jobs:
run-tests-example-apps:
runs-on: ubuntu-latest
Expand All @@ -30,4 +39,19 @@ jobs:
run: npm install -g http-server

- name: Run tests
run: cd examples/tests && npm test
if: inputs.update-screenshots == 'false'
run: cd examples/tests && npm test

- name: Run tests with updated screenshots
if: inputs.update-screenshots == 'true'
run: cd examples/tests && npm test -- --update-snapshots


- name: Upload screenshots
if: inputs.update-screenshots == 'true'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m 'ci: update screenshots' --allow-empty
git push
Loading