Skip to content

Commit 68997c1

Browse files
authored
info-improvements and more (#20)
Signed-off-by: Lawrence Lane <llane@nvidia.com>
1 parent 3dcb697 commit 68997c1

21 files changed

Lines changed: 321 additions & 343 deletions

File tree

.github/workflows/benchmarks.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Benchmarks
2+
3+
on:
4+
schedule:
5+
- cron: "0 3 * * 0"
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: benchmarks-${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
benchmarks:
14+
name: pytest-benchmark
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 15
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: astral-sh/setup-uv@v5
21+
with:
22+
python-version: "3.14t"
23+
enable-cache: true
24+
25+
- name: Install dependencies
26+
run: uv sync --group dev
27+
28+
- name: Run benchmarks
29+
env:
30+
CI: true
31+
PYTHON_GIL: "0"
32+
run: |
33+
uv run pytest benchmarks/ --benchmark-only --benchmark-json=benchmark-results.json -q
34+
35+
- name: Upload benchmark results
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: benchmark-results-${{ github.sha }}
39+
path: benchmark-results.json

.github/workflows/ci.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: "0 2 * * 0"
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ci-${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
lint:
18+
name: Lint & Format
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 10
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- uses: astral-sh/setup-uv@v5
25+
with:
26+
python-version: "3.14t"
27+
enable-cache: true
28+
29+
- name: Install dependencies
30+
run: uv sync --group dev
31+
32+
- name: Ruff check
33+
run: uv run ruff check src/ tests/ benchmarks/
34+
35+
- name: Ruff format check
36+
run: uv run ruff format src/ tests/ benchmarks/ --check
37+
38+
typecheck:
39+
name: Type Check
40+
runs-on: ubuntu-latest
41+
timeout-minutes: 10
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- uses: astral-sh/setup-uv@v5
46+
with:
47+
python-version: "3.14t"
48+
enable-cache: true
49+
50+
- name: Install dependencies
51+
run: uv sync --group dev
52+
53+
- name: ty check
54+
run: uv run ty check src/milo/
55+
56+
test:
57+
name: Test (Python ${{ matrix.python-version }}, ${{ matrix.os }})
58+
runs-on: ${{ matrix.os }}
59+
timeout-minutes: 20
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
os: [ubuntu-latest, macos-latest]
64+
python-version: ["3.14t"]
65+
66+
steps:
67+
- uses: actions/checkout@v4
68+
69+
- uses: astral-sh/setup-uv@v5
70+
with:
71+
python-version: ${{ matrix.python-version }}
72+
enable-cache: true
73+
74+
- name: Install dependencies
75+
run: uv sync --group dev
76+
77+
- name: Run tests with coverage
78+
env:
79+
CI: true
80+
PYTHON_GIL: "0"
81+
run: |
82+
uv run pytest tests/ -ra -q --maxfail=5 --tb=short \
83+
--cov=milo --cov-report=xml --cov-fail-under=80
84+
85+
- name: Upload coverage to Codecov
86+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14t'
87+
uses: codecov/codecov-action@v5
88+
with:
89+
files: coverage.xml
90+
fail_ci_if_error: false
91+
92+
- name: Verify GIL status (free-threaded only)
93+
if: matrix.python-version == '3.14t'
94+
run: uv run python -c "import sys; assert not sys._is_gil_enabled(), 'GIL should be disabled on 3.14t'"
95+
96+
# Weekly / manual: full test pass with verbose coverage (mirrors kida slow-tests pattern)
97+
slow-tests:
98+
name: Full Test Suite
99+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
100+
runs-on: ubuntu-latest
101+
timeout-minutes: 30
102+
steps:
103+
- uses: actions/checkout@v4
104+
105+
- uses: astral-sh/setup-uv@v5
106+
with:
107+
python-version: "3.14t"
108+
enable-cache: true
109+
110+
- name: Install dependencies
111+
run: uv sync --group dev
112+
113+
- name: Run all tests with term coverage
114+
env:
115+
CI: true
116+
PYTHON_GIL: "0"
117+
run: |
118+
uv run pytest tests/ -v --tb=short --cov=milo --cov-report=term-missing --timeout=300

.github/workflows/python-publish.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v4
1616

17-
- uses: actions/setup-python@v5
17+
- uses: astral-sh/setup-uv@v5
1818
with:
1919
python-version: "3.14t"
20+
enable-cache: true
2021

2122
- name: Build release distributions
22-
run: |
23-
python -m pip install build
24-
python -m build
23+
run: uv build
2524

2625
- name: Upload distributions
2726
uses: actions/upload-artifact@v4

.github/workflows/tests.yml

Lines changed: 0 additions & 144 deletions
This file was deleted.

.github/workflows/ty.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
hooks:
2121
- id: ruff-format
2222
name: ruff format
23-
entry: uv run ruff format .
23+
entry: uv run ruff format src/ tests/ benchmarks/
2424
language: system
2525
types: [python]
2626
pass_filenames: false

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ All notable changes to Milo are documented here.
7777

7878
## 0.1.0 — 2026-03-26
7979

80-
Initial release. See [release notes](https://lbliii.github.io/milo/releases/0.1.0/).
80+
Initial release. See [release notes](https://lbliii.github.io/milo-cli/releases/0.1.0/).

0 commit comments

Comments
 (0)