Skip to content

Commit aa2b700

Browse files
committed
Error handler and Error logging added
1 parent d8c7dc3 commit aa2b700

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

.github/workflows/unittests.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,29 @@ jobs:
4141
# Installs HTMLHint and Stylelint using pnpm
4242
- name: Install dependencies
4343
run: |
44+
set -e
4445
npm install -g pnpm
4546
pnpm install htmlhint stylelint stylelint-config-standard --save-dev
4647
47-
# Runs HTML validation
48+
# Runs HTML validation and logs errors
4849
- name: Validate HTML
49-
run: npx htmlhint .
50+
run: |
51+
set -e
52+
npx htmlhint . 2> html_validation_errors.log || true
53+
if [ -s html_validation_errors.log ]; then
54+
echo "HTML validation errors found. Check html_validation_errors.log for details."
55+
exit 1
56+
fi
5057
51-
# Runs CSS validation
58+
# Runs CSS validation and logs errors
5259
- name: Validate CSS
53-
run: npx stylelint "**/*.css"
60+
run: |
61+
set -e
62+
npx stylelint "**/*.css" 2> css_validation_errors.log || true
63+
if [ -s css_validation_errors.log ]; then
64+
echo "CSS validation errors found. Check css_validation_errors.log for details."
65+
exit 1
66+
fi
67+
68+
5469

0 commit comments

Comments
 (0)