diff --git a/.github/workflows/run-tests-example-apps-write-screenshots.yml b/.github/workflows/run-tests-example-apps-write-screenshots.yml new file mode 100644 index 000000000..2ad7ed805 --- /dev/null +++ b/.github/workflows/run-tests-example-apps-write-screenshots.yml @@ -0,0 +1,35 @@ +name: Run tests for example apps + +on: + workflow_dispatch: + +jobs: + update-screenshots-example-apps: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + + - name: Install dependencies + run: cd examples/tests && npm ci + + - name: Install Playwright browsers + run: cd examples/tests && npx playwright install --with-deps + + - name: Install http-server globally + run: npm install -g http-server + + - name: Run tests + run: cd examples/tests && npm test -- --update-snapshots + + - name: Upload screenshots + run: | + git add . + git commit -m 'ci: update screenshots' --allow-empty + git push \ No newline at end of file