From 8e60a3667aac41a6e0976eb0892c1f4a208ce9ed Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Fri, 11 Sep 2026 13:55:53 +0200 Subject: [PATCH] Run the free-day interop gate in CI where Flutter exists The pre-commit job has no Flutter and no freedays venv, so the new hook could only fail there. It now runs as its own job in python-tests.yml (utils checkout + a venv with crdt-sync and freedays + subosito Flutter), and the pre-commit job SKIPs that one hook, with the reason next to it. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_019pBgaXSJKyY3DarYpDatDF --- .github/workflows/pre-commit.yml | 4 ++++ .github/workflows/python-tests.yml | 34 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index d244119..34bc5b6 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -29,4 +29,8 @@ jobs: python-version: "3.x" - name: Install dependencies run: pip install -r requirements.txt + # free-days-interop needs Flutter and the freedays venv; it runs as its + # own job in python-tests.yml, so skipping it here is not fail-open. - uses: pre-commit/action@v3.0.1 + env: + SKIP: free-days-interop diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index c25d876..3a9643d 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -22,3 +22,37 @@ jobs: - name: Run tests with coverage run: python -m pytest -v + + # The Dart free-day rules are a port of ~/utils/freedays. This is the + # cross-language gate (scripts/free_days_interop/check.sh): it needs both + # Flutter and the Python package, which the pre-commit job does not have, + # so it runs here and the pre-commit job SKIPs that one hook. + free-days-interop: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Check out the Python side of the pool + uses: actions/checkout@v4 + with: + repository: kuhyx/utils + path: .utils + + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install freedays into its own venv + run: | + python -m venv .freedays-venv + .freedays-venv/bin/pip install --quiet .utils/crdt-sync + .freedays-venv/bin/pip install --quiet --no-deps .utils/freedays + + - uses: subosito/flutter-action@v2 + with: + flutter-version: 3.47.3 + channel: stable + cache: true + + - name: Dart writes, Python replays, both must agree + run: FREEDAYS_PYTHON="$PWD/.freedays-venv/bin/python" bash scripts/free_days_interop/check.sh