From 515700b7b154062ad59153918f49d762dd8cd044 Mon Sep 17 00:00:00 2001 From: TheHedgeify Date: Wed, 19 Nov 2025 11:20:04 +0100 Subject: [PATCH 1/3] github action that triggers checks --- .github/workflows/new_problem_check.yml | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/new_problem_check.yml diff --git a/.github/workflows/new_problem_check.yml b/.github/workflows/new_problem_check.yml new file mode 100644 index 0000000..6aaeafd --- /dev/null +++ b/.github/workflows/new_problem_check.yml @@ -0,0 +1,38 @@ +name: New Problem Check + +on: + push: + paths: + - "utils/new_problem.yaml" + - "utils/validate_yaml.py" + pull_request: + - "utils/new_problem.yaml" + - "utils/validate_yaml.py" + 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@v3 + + - 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 utils/new_problem.yaml + From a775d47b186876ff92ccab0e19de3d28e2a05751 Mon Sep 17 00:00:00 2001 From: TheHedgeify Date: Wed, 19 Nov 2025 11:22:56 +0100 Subject: [PATCH 2/3] fixing syntax --- .github/workflows/new_problem_check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/new_problem_check.yml b/.github/workflows/new_problem_check.yml index 6aaeafd..0d020c6 100644 --- a/.github/workflows/new_problem_check.yml +++ b/.github/workflows/new_problem_check.yml @@ -6,6 +6,7 @@ on: - "utils/new_problem.yaml" - "utils/validate_yaml.py" pull_request: + paths: - "utils/new_problem.yaml" - "utils/validate_yaml.py" workflow_dispatch: # allow triggering workflow manually From 754a496357212ad5e5b36ebb5f439fdeccac9ce3 Mon Sep 17 00:00:00 2001 From: TheHedgeify Date: Wed, 19 Nov 2025 11:24:54 +0100 Subject: [PATCH 3/3] only execute when the file changes --- .github/workflows/new_problem_check.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/new_problem_check.yml b/.github/workflows/new_problem_check.yml index 0d020c6..5a13ee6 100644 --- a/.github/workflows/new_problem_check.yml +++ b/.github/workflows/new_problem_check.yml @@ -4,11 +4,9 @@ on: push: paths: - "utils/new_problem.yaml" - - "utils/validate_yaml.py" pull_request: paths: - "utils/new_problem.yaml" - - "utils/validate_yaml.py" workflow_dispatch: # allow triggering workflow manually inputs: reason: