Skip to content

[#0] add GitHub workflows to enforce coding standards and practices #1

[#0] add GitHub workflows to enforce coding standards and practices

[#0] add GitHub workflows to enforce coding standards and practices #1

name: Check Logic Separation
on:
push:
branches: [ '*' ]
pull_request:
branches: [ main ]
jobs:
check-logic-separation:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Ensure UI logic is only in src/lotto/main.py
run: |
if grep -E 'print\(|input\(' src/lotto/lotto.py; then
echo "❌ UI logic (print or input) should not be in src/lotto/lotto.py!"
exit 1
fi
# - name: Ensure core logic is only in src/lotto/lotto.py
# run: |
# if grep -E 'def ' src/lotto/main.py | grep -v 'main'; then
# echo "❌ Core logic (function definitions) should not be in src/lotto/main.py!"
# exit 1
# fi