Skip to content

Commit

Permalink
Add deprecated check in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ronilaukkarinen committed Sep 10, 2024
1 parent a676fbb commit e4ba9ca
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/styles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,24 @@ jobs:
npx stylelint . --max-warnings 0 --config .stylelintrc
- name: Run gulp task devstyles in this project
if:
run: |
wget https://raw.githubusercontent.com/digitoimistodude/air-light/master/package.json
npm install
npx gulp devstyles
# Capture the output
output=$(npx gulp devstyles 2>&1)
# Save it to a temporary file
echo "$output" > output.txt
# Check if the output contains the string "DEPRECATED" or "ERROR" or "WARNING"
if grep -q "DEPRECATED" output.txt || grep -q "ERROR" output.txt || grep -q "WARNING" output.txt; then
echo "Error found in output, failing build..."
exit 1
else
echo "No errors found in output."
fi
# Remove the temporary file
rm output.txt

0 comments on commit e4ba9ca

Please sign in to comment.