下記は console.log() , FIXME を含んでいたら CI を落とす例。
検索ワードやディでクトリは適宜書き換えてください。
name: NG words
on: [push, pull_request]
jobs:
check-console:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
if grep -rE "console\.log\(" ./src; then
exit 1
else
echo "All good"
fi
check-fixme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
if grep -rE "FIXME" ./src; then
exit 1
else
echo "All good"
fi