Skip to content

Commit 7f66665

Browse files
committed
ci: add GitHub Actions workflow to run tests on PRs
Previously no CI workflow ran pytest on pull requests, so regressions could land undetected. This adds a test.yml workflow triggered on PRs and pushes to main. - Split into three parallel jobs: core, inspect, helm - Core job runs tests that need no optional dependencies - Inspect and HELM jobs install their respective extras - Pin action versions to match regenerate_types.yml - Add timeout-minutes: 10 to guard against hung jobs - Update uv.lock Closes #88
1 parent 411f60b commit 7f66665

2 files changed

Lines changed: 100 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
core:
10+
name: Core tests
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 10
13+
steps:
14+
- uses: actions/checkout@v6.0.2
15+
- uses: astral-sh/setup-uv@v7.6.0
16+
17+
- name: Install core dependencies
18+
run: uv sync --locked
19+
20+
- name: Run core tests
21+
run: |
22+
uv run pytest \
23+
tests/test_validate.py \
24+
tests/test_check_duplicate_entries.py \
25+
tests/test_inspect_uuid_utils.py \
26+
tests/test_cli_inspect_uuid.py \
27+
tests/test_lm_eval_adapter.py \
28+
-v
29+
30+
inspect:
31+
name: Inspect converter tests
32+
runs-on: ubuntu-latest
33+
timeout-minutes: 10
34+
steps:
35+
- uses: actions/checkout@v6.0.2
36+
- uses: astral-sh/setup-uv@v7.6.0
37+
38+
- name: Install dependencies with inspect extra
39+
run: uv sync --locked --extra inspect
40+
41+
- name: Run inspect tests
42+
run: |
43+
uv run pytest \
44+
tests/test_inspect_adapter.py \
45+
tests/test_inspect_instance_level_adapter.py \
46+
-v
47+
48+
helm:
49+
name: HELM converter tests
50+
runs-on: ubuntu-latest
51+
timeout-minutes: 10
52+
steps:
53+
- uses: actions/checkout@v6.0.2
54+
- uses: astral-sh/setup-uv@v7.6.0
55+
56+
- name: Install dependencies with helm extra
57+
run: uv sync --locked --extra helm
58+
59+
- name: Run HELM tests
60+
run: |
61+
uv run pytest \
62+
tests/test_helm_adapter.py \
63+
tests/test_helm_instance_level_adapter.py \
64+
-v

uv.lock

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)