diff --git a/.gitea/workflows/python-syntax.yml b/.gitea/workflows/python-syntax.yml new file mode 100644 index 0000000..4f4de99 --- /dev/null +++ b/.gitea/workflows/python-syntax.yml @@ -0,0 +1,38 @@ +name: Python syntax & lint + +on: + push: + branches: ["**"] + pull_request: + branches: ["**"] + +jobs: + syntax-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install flake8 + + - name: Run Python syntax check + run: | + set -e + files=$(git ls-files '*.py') + if [ -z "$files" ]; then echo "No Python files to check"; exit 0; fi + python -m py_compile $files + + - name: Run flake8 lint + run: | + files=$(git ls-files '*.py') + if [ -z "$files" ]; then echo "No Python files to lint"; exit 0; fi + flake8 $files diff --git a/README.md b/README.md index c1424ee..0124973 100644 --- a/README.md +++ b/README.md @@ -94,4 +94,6 @@ python batch.py - `requirements.txt` — Python dependencies. ## License -- MIT No Attribution — see `MIT-0.txt`. \ No newline at end of file +- MIT No Attribution — see `MIT-0.txt`. + +## Made with Claude Sonnet in about 15 Minutes. \ No newline at end of file