This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check for console.log statements | |
on: pull_request | |
jobs: | |
check_console_log: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v3 | |
- name: Run console.log check | |
run: | | |
found=$(find src/ -type f ! -name "main.ts" ! -path "*/migrations/index.ts" | xargs grep "console.log" || true) | |
if [ -n "$found" ]; then | |
echo "console.log found in the following files:" | |
echo "$found" | |
exit 1 | |
fi | |
echo "No console.log statements found!" |