From 39611c973f959e7086f4b699295cc0be884f7def Mon Sep 17 00:00:00 2001 From: yhm Date: Sat, 14 Mar 2026 00:46:31 +0800 Subject: [PATCH] feat: Add CI workflow (Fixes #1) - Add Python syntax validation - Add module structure check - Add basic linting --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9d41720 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Validate Python syntax + run: | + python -m py_compile DAM3000M.py + echo "Python syntax is valid" + + - name: Check module structure + run: | + python -c "import ast; ast.parse(open('DAM3000M.py').read())" + echo "Module structure is valid" + + - name: Lint + run: | + pip install flake8 + flake8 DAM3000M.py --max-line-length=120 || echo "Lint warnings found"