Skip to content

Commit

Permalink
Add job summary for visual tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Taucher2003 committed Dec 18, 2023
1 parent 17b87d8 commit 2a70780
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,18 @@ storybook:test:
- npm ci
- npm run storybook:dev &
- curl --fail -sv --retry 30 --retry-delay 3 --head --retry-all-errors http://127.0.0.1:6006
- npm run storybook:test:all -- --ci
- npm run storybook:test:all -- --ci || exit_code=$?
- |
if [[ $exit_code -ne 0 && -d "__snapshots__/__diff_output__" ]]; then
echo -e "\e[0Ksection_start:`date +%s`:glpa_summary\r\e[0KHeader of the summary"
echo "Storybook tests failed."
echo "Check for rendering differences at http://gitlab.com/code0-tech/base-ui/-/jobs/$CI_JOB_ID/artifacts/browse/__snapshots__/__diff_output__/"
echo "If the changes are intended, update the fixtures with npm run storybook:test:update"
echo -e "\e[0Ksection_end:`date +%s`:glpa_summary\r\e[0K"
fi
exit $exit_code
artifacts:
when: on_failure
paths:
- __snapshots__/__diff_output__
expire_in: 7 days

0 comments on commit 2a70780

Please sign in to comment.