From 90cbd7f80a0c450318d7f2ea357bf43d35fbe8e9 Mon Sep 17 00:00:00 2001 From: Olaf Mersmann Date: Mon, 12 Oct 2026 14:43:44 +0200 Subject: [PATCH] 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. --- .github/workflows/new_problem_check.yml | 31 ------------------------- .github/workflows/validate_problems.yml | 30 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/new_problem_check.yml create mode 100644 .github/workflows/validate_problems.yml diff --git a/.github/workflows/new_problem_check.yml b/.github/workflows/new_problem_check.yml deleted file mode 100644 index 88b198c..0000000 --- a/.github/workflows/new_problem_check.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: New Problem Check - -on: - workflow_dispatch: # allow triggering workflow manually - inputs: - reason: - description: "Reason for Running" - required: false - default: "Manually trigger problem check" - -jobs: - check_new_problems: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r utils/requirements.txt - - - name: Run New Problem Check - run: | - python utils/validate_yaml.py problems.yaml - diff --git a/.github/workflows/validate_problems.yml b/.github/workflows/validate_problems.yml new file mode 100644 index 0000000..52e698e --- /dev/null +++ b/.github/workflows/validate_problems.yml @@ -0,0 +1,30 @@ +name: Validate problems.yaml + +on: + push: + branches: ["main"] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + python-version: "3.10" + + - name: Install the project + run: uv sync + + - name: Validate problems.yaml against the schema + run: uv run opl validate problems.yaml