ci(ref_imgs): make the CI fail if there not all ref. images are added (#7086)
@@ -91,9 +91,34 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
tests/ref_imgs*/**/*_err.png
|
tests/ref_imgs*/**/*_err.png
|
||||||
test_screenshot_error.h
|
test_screenshot_error.h
|
||||||
# - name: Upload coverage to Codecov
|
- id: check_untracked_ref_imgs
|
||||||
# uses: codecov/codecov-action@v4
|
name: Check for new files and upload them as artifacts if found
|
||||||
# if: github.event_name == 'push' && github.repository == 'lvgl/lvgl'
|
run: |
|
||||||
# with:
|
NEW_REF_IMGS=$(git status --porcelain -- tests/ref_imgs* | grep '^??' | awk '{print $2}')
|
||||||
# fail_ci_if_error: true
|
|
||||||
# verbose: true
|
if [ -n "$NEW_REF_IMGS" ]; then
|
||||||
|
echo "New files were added during the build process."
|
||||||
|
echo "Uploading untracked ref. images as artifacts..."
|
||||||
|
for file in $NEW_REF_IMGS; do
|
||||||
|
echo "Found new file: $file"
|
||||||
|
done
|
||||||
|
zip -r untracked_ref_imgs.zip $NEW_REF_IMGS
|
||||||
|
echo "::set-output name=new_ref_imgs_found::true"
|
||||||
|
else
|
||||||
|
echo "No new files were found."
|
||||||
|
echo "::set-output name=new_ref_imgs_found::false"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload untracked reference images
|
||||||
|
if: steps.check_untracked_ref_imgs.outputs.new_ref_imgs_found == 'true'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Untracked Reference Images
|
||||||
|
path: untracked_ref_imgs.zip
|
||||||
|
|
||||||
|
- name: Fail the build if new files were found
|
||||||
|
if: steps.check_untracked_ref_imgs.outputs.new_ref_imgs_found == 'true'
|
||||||
|
run: |
|
||||||
|
echo "Failing the build due to newly generated reference images."
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
|||||||
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 136 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 3.7 KiB |