diff --git a/.github/workflows/new_problem_check.yml b/.github/workflows/new_problem_check.yml new file mode 100644 index 0000000..5a13ee6 --- /dev/null +++ b/.github/workflows/new_problem_check.yml @@ -0,0 +1,37 @@ +name: New Problem Check + +on: + push: + paths: + - "utils/new_problem.yaml" + pull_request: + paths: + - "utils/new_problem.yaml" + 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 +