File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,35 @@ jobs:
63
63
git push
64
64
fi
65
65
66
- - name : Run pixel validation
67
- run : npm run validate-defs-without-formatting -- -g ../internal-github-asana-utils/user_map.yml
66
+ - name : Run pixel validation (with annotations)
67
+ id : validate
68
+ shell : bash
69
+ run : |
70
+ set -o pipefail
71
+ LOG=validation.log
72
+ npm run validate-defs-without-formatting -- -g ../internal-github-asana-utils/user_map.yml 2>&1 | tee "$LOG"
73
+ status=$?
74
+ if [ $status -ne 0 ]; then
75
+ echo "::group::Pixel validation errors"
76
+ sed -n '1,200p' "$LOG"
77
+ echo "::endgroup::"
78
+ # Annotate lines that look like errors
79
+ grep -i -E "error|fail" "$LOG" | sed 's/%/%25/g;s/\r/%0D/g;s/\n/%0A/g' | while read -r line; do
80
+ echo "::error title=Pixel validation failed::${line}"
81
+ done
82
+ exit $status
83
+ fi
68
84
working-directory : PixelDefinitions
69
85
86
+ - name : Upload validation log
87
+ if : always()
88
+ uses : actions/upload-artifact@v4
89
+ with :
90
+ name : pixel-validation-log
91
+ path : PixelDefinitions/validation.log
92
+ if-no-files-found : ignore
93
+ retention-days : 5
94
+
70
95
71
96
72
97
You can’t perform that action at this time.
0 commit comments