[dist] debug publishing #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Adapted from tatsu/.github/workflows/default.yml | ||
| # Copyright (c) 2026 Juancarlo Añez (apalala@gmail.com) | ||
| # SPDX-License-Identifier: BSD-4-Clause | ||
| name: tests default | ||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: | ||
| - '3.15' | ||
| - '3.14' | ||
| - '3.13' | ||
| - '3.12' | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: oven-sh/setup-bun@v2 | ||
| - uses: astral-sh/setup-uv@v7 | ||
| - uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| allow-prereleases: true | ||
| - name: install dependencies | ||
| run: bun install | ||
| - name: check formatting and types | ||
| run: | | ||
| bun x biome check src/ | ||
| bun x tsc --noEmit | ||
| - name: build TS | ||
| run: bun build ./src/tsemekwes.ts ./src/cmd/parse-worker.ts --outdir ./dist --target bun | ||
| - name: run TS tests | ||
| run: bun test | ||
| - name: install Python deps | ||
| run: uv sync | ||
| - name: generate types | ||
| run: uv run ts2python src/tsemekwes/types.ts -o src/tsemekwes --compatibility 3.12 | ||
| - name: verify Python wrapper | ||
| run: uv run python -c " | ||
| import tsemekwes as tw | ||
| r = tw.parse('grammar/calc.ebnf', '1+2') | ||
| assert r == ['1', '+', '2'] | ||
| g = tw.Grammar.load('grammar/calc.ebnf') | ||
| assert g.info() != '' | ||
| " | ||
| - name: build wheel | ||
| run: uvx hatch build | ||