Skip to content

Commit

Permalink
Tweak CI failure diffing, produce an artifact for fixing baseline err…
Browse files Browse the repository at this point in the history
…ors (#58041)
  • Loading branch information
jakebailey authored Apr 2, 2024
1 parent 42a215c commit 8e11448
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ jobs:

- name: Print baseline diff on failure
if: ${{ failure() && steps.test.conclusion == 'failure' }}
run: git diff --diff-filter=AM --no-index -- ./tests/baselines/reference ./tests/baselines/local
run: |
npx hereby baseline-accept
git add tests/baselines/reference
git diff --staged --exit-code
lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -274,6 +277,7 @@ jobs:
git add tests/baselines/reference
- name: Check baselines
id: check-baselines
run: |
function print_diff() {
if ! git diff --staged --exit-code --quiet --diff-filter=$1; then
Expand All @@ -286,5 +290,13 @@ jobs:
print_diff ACR "Missing baselines"
print_diff MTUXB "Modified baselines"
print_diff D "Unused baselines"
git diff --staged > fix_baselines.patch
exit 1
fi
- name: Upload baseline diff artifact
if: ${{ failure() && steps.check-baselines.conclusion == 'failure' }}
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: fix_baselines.patch
path: fix_baselines.patch

0 comments on commit 8e11448

Please sign in to comment.