* Use bun in package.json * Update workflows * Update more workflows * Kick ci * Fix yaml * Fix type errors * Compat with snyk * Fix jest resolutions * Add another esm package * Fix aliases and next js missing deps * Update next js embed tests * Try fix embed test config * Fix * Fix requires in e2e support * Use bun not yarn in embed bin * Revert config changes * Use bun in more scripts and use prepare-release action * Replace more yarn usages * Remove overrides from bunfig move to package json * Revert e2e support changes * Add back comment * [ci skip] comment typo * Update bun lock * Update to reference bun * Update to reference bun * Update license disclaimer * Tidy tests * Update to use bun in workflows * Change aliases * Update codemirrort selector * Tidy license generation * Remove .only * Fix yarn references * Checkout .github for release scripts * Update lockfile * Re-add package * update release bunlock * fix checkout check --------- Co-authored-by: Ryan Laurie <iethree@gmail.com>
68 lines
2.2 KiB
YAML
68 lines
2.2 KiB
YAML
name: Update Loki Snapshots
|
|
|
|
on:
|
|
pull_request:
|
|
types: [labeled]
|
|
|
|
jobs:
|
|
check-label-and-update-snapshot:
|
|
if: contains(github.event.pull_request.labels.*.name, 'loki-update')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
|
|
ref: ${{ github.head_ref }}
|
|
|
|
- name: Prepare frontend environment
|
|
uses: ./.github/actions/prepare-frontend
|
|
|
|
- name: Prepare back-end environment
|
|
uses: ./.github/actions/prepare-backend
|
|
|
|
- name: Compile CLJS
|
|
run: bun run build-pure:cljs
|
|
|
|
- name: Update Loki Snapshots
|
|
run: bun run test-visual:loki:ci || bun run test-visual:loki-approve-diff && bun run test-visual:loki-prune
|
|
|
|
- name: Check for changes
|
|
id: check-changes
|
|
run: |
|
|
if [[ -n "$(git status --porcelain .loki/reference/)" ]]; then
|
|
echo "has_changes=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "has_changes=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Commit and Push Changes
|
|
if: steps.check-changes.outputs.has_changes == 'true'
|
|
run: |
|
|
git config --global user.name "Metabase Automation"
|
|
git config --global user.email "github-automation@metabase.com"
|
|
git add .loki/reference/
|
|
git commit -m "Update Loki Snapshots"
|
|
git push
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
|
|
|
|
- name: Notify No Changes
|
|
if: steps.check-changes.outputs.has_changes == 'false'
|
|
uses: ./.github/actions/notify-pull-request
|
|
with:
|
|
include-log: false
|
|
message: No visual differences were found. All Loki snapshots are up to date.
|
|
|
|
- name: Remove 'loki-update' label
|
|
uses: actions/github-script@v7
|
|
with:
|
|
github-token: ${{secrets.METABASE_AUTOMATION_USER_TOKEN}}
|
|
script: |
|
|
github.rest.issues.removeLabel({
|
|
issue_number: context.issue.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
name: 'loki-update'
|
|
});
|