From 44056927762a8859ab912edfcaa68bba5edc6c0c Mon Sep 17 00:00:00 2001 From: Srix Date: Sun, 20 Sep 2026 14:42:12 +0530 Subject: [PATCH 1/2] Add CI: pytest on Python 3.10 and 3.12, plus a codegen-drift check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .github/workflows/test.yml - pytest job, matrix 3.10 / 3.12, pip install -r requirements.txt. - codegen-drift job: installs Java, runs codegen.sh and fails if anything under pytamil/தமிழ்/codegen differs, so the committed parsers can never fall out of sync with the .g4 grammars. requirements.txt: PyYAML 6.0 -> 6.0.2. 6.0 fails to build on Python 3.12 (Cython 3 build_ext incompatibility); 6.0.2 supports 3.8-3.13. Verified locally: 116 passed, 9 xfailed on both 3.10 and 3.12. Roadmap Phase 1d (specs/2026-09-20-revival-and-roadmap.md). Co-Authored-By: Claude Fable 5.1 --- .github/workflows/test.yml | 40 ++++++++++++++++++++++++++++++++++++++ requirements.txt | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..e89c277 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,40 @@ +name: tests + +on: + push: + branches: ["master", "phase*/**", "srix"] + pull_request: + +jobs: + pytest: + name: pytest (py${{ matrix.python }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python: ["3.10", "3.12"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + cache: pip + - run: python -m pip install -r requirements.txt + - run: python -m pytest -q + + codegen-drift: + # The generated parsers under pytamil/தமிழ்/codegen are committed. Regenerate them + # from the grammars and fail if anything differs, so grammar and codegen cannot drift. + name: codegen matches grammars + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "21" + - run: bash codegen.sh + - name: fail on drift + run: | + git status --porcelain -- pytamil/தமிழ்/codegen + git diff --exit-code --stat -- pytamil/தமிழ்/codegen diff --git a/requirements.txt b/requirements.txt index 5dd6522..cfc869a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ Open-Tamil==1.1 packaging==23.1 pluggy==1.0.0 pytest==7.3.1 -PyYAML==6.0 +PyYAML==6.0.2 # 6.0 does not build on Python 3.12+ regex==2023.5.5 TatSu==5.8.3 tomli==2.0.1 From 4a7c00063066ad499a13a2c7cca4b8b4f19496af Mon Sep 17 00:00:00 2001 From: Srix Date: Sun, 20 Sep 2026 14:43:41 +0530 Subject: [PATCH 2/2] CI: bump actions to current majors (checkout v5, setup-python v6, setup-java v5) The first run warned that v4/v5 of these target the deprecated Node 20 runtime. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e89c277..86795c7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,8 +14,8 @@ jobs: matrix: python: ["3.10", "3.12"] steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python }} cache: pip @@ -28,8 +28,8 @@ jobs: name: codegen matches grammars runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: actions/checkout@v5 + - uses: actions/setup-java@v5 with: distribution: temurin java-version: "21"