Skip to content

Commit 9079cd8

Browse files
committed
ci: Validate problems.yaml against the schema on every pull request
The old New Problem Check workflow only ran when triggered manually and used utils/validate_yaml.py, which still expects the old list-based format and fails on the current problems.yaml. Replace it with a check that runs opl validate on every pull request and push to main.
1 parent ffb58cb commit 9079cd8

2 files changed

Lines changed: 35 additions & 9 deletions

File tree

‎.github/workflows/new_problem_check.yml‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,13 @@ jobs:
1515
- name: Checkout repository
1616
uses: actions/checkout@v7
1717

18-
- name: Set up Python
19-
uses: actions/setup-python@v6
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v10.3.2
2020
with:
21-
python-version: '3.x'
21+
python-version: 3.14
2222

2323
- name: Install dependencies
24-
run: |
25-
python -m pip install --upgrade pip
26-
pip install -r utils/requirements.txt
24+
run: uv sync --dev
2725

2826
- name: Run New Problem Check
29-
run: |
30-
uv run utils/validate_yaml.py problems.yaml
31-
27+
run: uv run utils/validate_yaml.py problems.yaml
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Validate problems.yaml
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
validate:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v6
18+
with:
19+
persist-credentials: false
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v7
23+
with:
24+
python-version: "3.10"
25+
26+
- name: Install the project
27+
run: uv sync
28+
29+
- name: Validate problems.yaml against the schema
30+
run: uv run opl validate problems.yaml

0 commit comments

Comments
 (0)