From 780e6f64f01ccf6951b74d956f88e28541289cca Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 7 Jan 2026 23:23:10 +0530 Subject: [PATCH] ci: disable legacy workflows in favor of reusable CI --- .github/workflows/api_branch_ci.yaml | 11 +++++++---- .github/workflows/branch_ci.yml | 12 ++++++++++++ .github/workflows/pytest.yaml | 9 +++++++-- .github/workflows/pytest_unit.yaml | 19 +++++++++++-------- 4 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/branch_ci.yml diff --git a/.github/workflows/api_branch_ci.yaml b/.github/workflows/api_branch_ci.yaml index 43b5797a2..5109afa61 100644 --- a/.github/workflows/api_branch_ci.yaml +++ b/.github/workflows/api_branch_ci.yaml @@ -1,10 +1,13 @@ name: API Tests + Docker build (branch) run-name: 'Test branch commit "${{ github.event.head_commit.message }}"' -on: - push: - branches-ignore: [ "main" ] - paths-ignore: ['README.md'] +# on: + # push: + # branches-ignore: [ "main" ] + # paths-ignore: ['README.md'] +on: + workflow_dispatch: + jobs: branch_ci: diff --git a/.github/workflows/branch_ci.yml b/.github/workflows/branch_ci.yml new file mode 100644 index 000000000..28d89ca46 --- /dev/null +++ b/.github/workflows/branch_ci.yml @@ -0,0 +1,12 @@ +name: Branch CI + +on: + push: + branches-ignore: ["main"] + pull_request: + +jobs: + run-ci: + uses: openclimatefix/.github/.github/workflows/branch_ci@main + secrets: + HF_TOKEN: ${{ secrets.HF_TOKEN }} diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 3248331c5..f5c75c88d 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -1,16 +1,21 @@ name: Python package tests - integration +# on: + # push: + # schedule: + # - cron: "0 12 * * 1" on: - push: schedule: - cron: "0 12 * * 1" + workflow_dispatch: + jobs: call-run-python-tests-integration: # only run on push, not external PR uses: openclimatefix/.github/.github/workflows/python-test.yml@issue/pip-all - if: github.event_name == 'push' + with: # pytest-cov looks at this folder pytest_cov_dir: "quartz_solar_forecast" diff --git a/.github/workflows/pytest_unit.yaml b/.github/workflows/pytest_unit.yaml index 079fc88f8..76f54d9de 100644 --- a/.github/workflows/pytest_unit.yaml +++ b/.github/workflows/pytest_unit.yaml @@ -1,14 +1,17 @@ name: Unit Tests(branch) run-name: 'Test branch commit "${{ github.event.head_commit.message }}"' -on: - push: - branches-ignore: [ "main" ] - paths-ignore: ['README.md'] - pull_request: - types: [opened, synchronize, reopened] - pull_request_target: - types: [opened, synchronize, reopened, ready_for_review] +# on: + # push: + # branches-ignore: [ "main" ] + # paths-ignore: ['README.md'] + # pull_request: + # types: [opened, synchronize, reopened] + # pull_request_target: + # types: [opened, synchronize, reopened, ready_for_review] +on: + workflow_dispatch: + jobs: branch_ci: