-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (58 loc) · 2.22 KB
/
Copy pathpython-quality.yml
File metadata and controls
69 lines (58 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Python Quality
on:
push:
branches: [develop, master]
paths:
- "tools/ctld-tools/**"
- "src/**"
- "tools/build/**"
- "tests/ci/data/config_defaults.json"
- ".github/workflows/python-quality.yml"
pull_request:
paths:
- "tools/ctld-tools/**"
- "src/**"
- "tools/build/**"
- "tests/ci/data/config_defaults.json"
- ".github/workflows/python-quality.yml"
jobs:
python-quality:
name: ctld-tools quality gate
runs-on: ubuntu-latest
defaults:
run:
working-directory: tools/ctld-tools
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v7
with:
python-version: "3.13"
- name: Install Poetry
run: pip install poetry
- name: Install dependencies
run: poetry install --without build
- name: Lint (ruff check)
run: poetry run ruff check ctld_tools tests
- name: Format check (ruff format)
run: poetry run ruff format --check ctld_tools tests
- name: Type check (mypy)
run: poetry run mypy ctld_tools
# 27 tests install the real engine into a .miz and skip themselves when it is missing, so a
# job that does not build it stays green while that whole suite quietly stops running
# (CHORE-UNTRACK-BUILT-ENGINE measured 262 passed → 234 passed / 27 skipped / 1 failed).
# merge_CTLD.ps1 is the single build path — a lookalike built for the tests would drift.
- name: Build CTLD.lua (the tests install it)
working-directory: ${{ github.workspace }}
shell: pwsh
run: ./tools/build/merge_CTLD.ps1
# Tests include the oracle drift guard (committed tests/ci/data/config_defaults.json
# == fresh emit from src/CTLD_config.yaml) and the embed/wrap round-trip.
- name: Tests (pytest + coverage)
run: poetry run pytest
# tools/build/ is standalone scripts (no poetry project of its own, "pip only" per
# translate_i18n.py's original design) — install pytest directly and run against it.
- name: Tests (tools/build/, plain pytest)
working-directory: ${{ github.workspace }}
run: |
pip install pytest
pytest tools/build/