Skip to content

Update keywords

Update keywords #7

name: Compatibility (Python 3.12)
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
jobs:
compatibility:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]
python -m pip install wasmtime
if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi
- name: Run unit and pipeline tests
run: |
python -m pytest -q
- name: Run differential compatibility tests
run: |
set +e
python -m pytest -q tests/compatibility/differential_312_test.py | tee compatibility-output.txt
status=${PIPESTATUS[0]}
python - <<'PY' >> "$GITHUB_STEP_SUMMARY"
import re
from pathlib import Path
text = Path("compatibility-output.txt").read_text(encoding="utf-8")
summary_line = next(
(line.strip() for line in reversed(text.splitlines()) if " in " in line and "," in line),
"",
)
counts = {name: int(value) for value, name in re.findall(
r"(\d+)\s+(passed|failed|errors?|skipped)",
summary_line,
)}
passed = counts.get("passed", 0)
failures = counts.get("failed", 0)
errors = counts.get("error", 0) + counts.get("errors", 0)
skipped = counts.get("skipped", 0)
total = passed + failures + errors + skipped
ratio = (passed / total * 100.0) if total else 0.0
print("## Compatibility Score (Python 3.12)")
if total:
print(f"- Passed: {passed}/{total} ({ratio:.1f}%)")
print(f"- Failures: {failures}")
print(f"- Errors: {errors}")
print(f"- Skipped: {skipped}")
else:
print("- Unable to parse compatibility summary from pytest output.")
PY
exit $status
- name: Run compatibility smoke examples
run: |
python -m multilingualprogramming run examples/complete_features_en.multi --lang en
python -m multilingualprogramming run examples/complete_features_fr.multi --lang fr
python -m multilingualprogramming run examples/complete_features_es.multi --lang es