Skip to content

Commit

Permalink
feat: add job to regenerate snapshots in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget committed Nov 1, 2024
1 parent b5ddfa3 commit ce9afe1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,36 @@ jobs:
- name: Run tests
run: yarn ci:test

test-update:
if: always() && (needs.test.result == 'failure')
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Setup
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: 📥 Monorepo install
uses: ./.github/actions/yarn-nm-install
with:
cache-node-modules: true
cache-install-state: true

- name: 🏃🆙⏲️ Run test-update
run: yarn test:update

- name: 🆙 Upload snapshots
uses: actions/upload-artifact@v4
with:
name: snapshots-updates
path: ./packages/core/src/__tests__/__snapshots__
retention-days: 30

site:
runs-on: ubuntu-latest
steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Alpine.js > jsx > Javascript Test > Advanced 1`] = `
"<main x-data=\\"myBasicForShowComponent()\\">
<template x-for=\\"person in names\\">
<div>
<span x-html=\\"i\\"></span>
:
<span x-html=\\"person\\"></span>
</div>
</template>
<template x-for=\\"person in names\\">
<span><span x-html=\\"person\\"></span></span>
</template>
Expand Down

0 comments on commit ce9afe1

Please sign in to comment.