Skip to content

Commit e4ba9ca

Browse files
Add deprecated check in unit tests
1 parent a676fbb commit e4ba9ca

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/styles.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,24 @@ jobs:
5050
npx stylelint . --max-warnings 0 --config .stylelintrc
5151
5252
- name: Run gulp task devstyles in this project
53+
if:
5354
run: |
5455
wget https://raw.githubusercontent.com/digitoimistodude/air-light/master/package.json
5556
npm install
56-
npx gulp devstyles
57+
58+
# Capture the output
59+
output=$(npx gulp devstyles 2>&1)
60+
61+
# Save it to a temporary file
62+
echo "$output" > output.txt
63+
64+
# Check if the output contains the string "DEPRECATED" or "ERROR" or "WARNING"
65+
if grep -q "DEPRECATED" output.txt || grep -q "ERROR" output.txt || grep -q "WARNING" output.txt; then
66+
echo "Error found in output, failing build..."
67+
exit 1
68+
else
69+
echo "No errors found in output."
70+
fi
71+
72+
# Remove the temporary file
73+
rm output.txt

0 commit comments

Comments
 (0)