From dd563a9f0f3e70c2de9aec60cc8e564599371824 Mon Sep 17 00:00:00 2001 From: Jiwoo Lee Date: Thu, 17 Oct 2024 00:41:30 -0700 Subject: [PATCH 1/8] Update build_workflow.yml --- .github/workflows/build_workflow.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_workflow.yml b/.github/workflows/build_workflow.yml index ed6c2c49e..62e48db0c 100644 --- a/.github/workflows/build_workflow.yml +++ b/.github/workflows/build_workflow.yml @@ -6,6 +6,7 @@ on: pull_request: branches: [main] + types: [opened, synchronize, reopened, ready_for_review] workflow_dispatch: @@ -27,7 +28,7 @@ jobs: pre-commit-hooks: needs: check-jobs-to-skip - if: ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true'}} || ${{ github.event_name == 'push' }} + if: ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true'}} && ${{ github.event.pull_request.draft != true }} || ${{ github.event_name == 'push' }} runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -44,7 +45,7 @@ jobs: build: needs: check-jobs-to-skip - if: ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true'}} || ${{ github.event_name == 'push' }} + if: ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true'}} && ${{ github.event.pull_request.draft != true }} || ${{ github.event_name == 'push' }} runs-on: ubuntu-latest defaults: run: @@ -98,7 +99,7 @@ jobs: publish-docs: - if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} + if: ${{ (github.event_name == 'push' || github.event_name == 'pull_request') && github.event.pull_request.draft != true }} runs-on: ubuntu-latest defaults: run: @@ -146,4 +147,4 @@ jobs: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: _build/ - force_orphan: true \ No newline at end of file + force_orphan: true From d2785d6352fd7340efd54a9b97c322421fa21cb6 Mon Sep 17 00:00:00 2001 From: Jiwoo Lee Date: Mon, 21 Oct 2024 12:55:35 -0700 Subject: [PATCH 2/8] add test py file --- pcmdi_metrics/mean_climate/test_ci.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 pcmdi_metrics/mean_climate/test_ci.py diff --git a/pcmdi_metrics/mean_climate/test_ci.py b/pcmdi_metrics/mean_climate/test_ci.py new file mode 100644 index 000000000..f86c33704 --- /dev/null +++ b/pcmdi_metrics/mean_climate/test_ci.py @@ -0,0 +1 @@ +a=1+1 # this will fail pre-commit test From 4bb4785f6bf07c5d1df0e7afb1531ce75c320c01 Mon Sep 17 00:00:00 2001 From: Jiwoo Lee Date: Mon, 21 Oct 2024 13:22:41 -0700 Subject: [PATCH 3/8] adjust --- .github/workflows/build_workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_workflow.yml b/.github/workflows/build_workflow.yml index 62e48db0c..2f7a2e147 100644 --- a/.github/workflows/build_workflow.yml +++ b/.github/workflows/build_workflow.yml @@ -28,7 +28,7 @@ jobs: pre-commit-hooks: needs: check-jobs-to-skip - if: ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true'}} && ${{ github.event.pull_request.draft != true }} || ${{ github.event_name == 'push' }} + if: ${{ (needs.check-jobs-to-skip.outputs.should_skip != 'true' || github.event_name == 'push') && github.event.pull_request.draft != true }} runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -45,7 +45,7 @@ jobs: build: needs: check-jobs-to-skip - if: ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true'}} && ${{ github.event.pull_request.draft != true }} || ${{ github.event_name == 'push' }} + if: ${{ (needs.check-jobs-to-skip.outputs.should_skip != 'true' || github.event_name == 'push') && github.event.pull_request.draft != true }} runs-on: ubuntu-latest defaults: run: From 9346b60ce8e428e0149443d6b9f8cedb3a20a3e0 Mon Sep 17 00:00:00 2001 From: Jiwoo Lee Date: Mon, 21 Oct 2024 13:24:42 -0700 Subject: [PATCH 4/8] adjust --- .github/workflows/build_workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_workflow.yml b/.github/workflows/build_workflow.yml index 2f7a2e147..7ad4d4bb6 100644 --- a/.github/workflows/build_workflow.yml +++ b/.github/workflows/build_workflow.yml @@ -16,6 +16,7 @@ env: jobs: check-jobs-to-skip: + if: ${{ github.event.pull_request.draft != true }} runs-on: ubuntu-latest outputs: should_skip: ${{ steps.skip_check.outputs.should_skip }} From 929d7a480969cbc753810009cb81ff385d867987 Mon Sep 17 00:00:00 2001 From: Jiwoo Lee Date: Mon, 21 Oct 2024 13:39:19 -0700 Subject: [PATCH 5/8] adjust --- .github/workflows/build_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_workflow.yml b/.github/workflows/build_workflow.yml index 7ad4d4bb6..32dffb221 100644 --- a/.github/workflows/build_workflow.yml +++ b/.github/workflows/build_workflow.yml @@ -16,7 +16,7 @@ env: jobs: check-jobs-to-skip: - if: ${{ github.event.pull_request.draft != true }} + if: ${{ github.event.pull_request.draft != true && github.event.pull_request.draft != true }} runs-on: ubuntu-latest outputs: should_skip: ${{ steps.skip_check.outputs.should_skip }} From bdac145a6ee885b3ea9e33d491297fc3bf6d4eb0 Mon Sep 17 00:00:00 2001 From: Jiwoo Lee Date: Tue, 22 Oct 2024 14:26:39 -0700 Subject: [PATCH 6/8] test --- .github/workflows/build_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_workflow.yml b/.github/workflows/build_workflow.yml index 32dffb221..2c1c4f157 100644 --- a/.github/workflows/build_workflow.yml +++ b/.github/workflows/build_workflow.yml @@ -6,7 +6,7 @@ on: pull_request: branches: [main] - types: [opened, synchronize, reopened, ready_for_review] + types: [synchronize, ready_for_review] workflow_dispatch: From 62726bdd9bf954abbfdcc8df33885679ab17b5b5 Mon Sep 17 00:00:00 2001 From: Jiwoo Lee Date: Tue, 22 Oct 2024 14:38:05 -0700 Subject: [PATCH 7/8] test --- .github/workflows/build_workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_workflow.yml b/.github/workflows/build_workflow.yml index 2c1c4f157..76ab51dad 100644 --- a/.github/workflows/build_workflow.yml +++ b/.github/workflows/build_workflow.yml @@ -6,7 +6,7 @@ on: pull_request: branches: [main] - types: [synchronize, ready_for_review] + types: [review_requested, ready_for_review] workflow_dispatch: @@ -16,7 +16,7 @@ env: jobs: check-jobs-to-skip: - if: ${{ github.event.pull_request.draft != true && github.event.pull_request.draft != true }} + if: ${{ github.event.pull_request.draft != true }} runs-on: ubuntu-latest outputs: should_skip: ${{ steps.skip_check.outputs.should_skip }} From 42531566cf4c64f5c276492067617d12ee776463 Mon Sep 17 00:00:00 2001 From: Jiwoo Lee Date: Tue, 22 Oct 2024 14:44:36 -0700 Subject: [PATCH 8/8] remove ci-fail triggering file that was added for just this test --- pcmdi_metrics/mean_climate/test_ci.py | 1 - 1 file changed, 1 deletion(-) delete mode 100644 pcmdi_metrics/mean_climate/test_ci.py diff --git a/pcmdi_metrics/mean_climate/test_ci.py b/pcmdi_metrics/mean_climate/test_ci.py deleted file mode 100644 index f86c33704..000000000 --- a/pcmdi_metrics/mean_climate/test_ci.py +++ /dev/null @@ -1 +0,0 @@ -a=1+1 # this will fail pre-commit test