From 87229fa1061de10a3388ed45a52670fbebd5a43a Mon Sep 17 00:00:00 2001 From: jdebacker Date: Wed, 15 May 2024 13:41:03 -0400 Subject: [PATCH 1/3] on main only --- .github/workflows/build_and_test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 0c5f184..3b1b8fc 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -1,6 +1,8 @@ name: Build and test [Python 3.9, 3.10, 3.11] on: [push, pull_request] + branches: + - main jobs: build: From a70cf28d3ed4b55ff833a06cf411d0446728204f Mon Sep 17 00:00:00 2001 From: jdebacker Date: Wed, 15 May 2024 14:08:56 -0400 Subject: [PATCH 2/3] just restrict codecov to main branch --- .github/workflows/build_and_test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 3b1b8fc..9b64e2a 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -1,8 +1,6 @@ name: Build and test [Python 3.9, 3.10, 3.11] on: [push, pull_request] - branches: - - main jobs: build: @@ -37,6 +35,7 @@ jobs: run: | pytest -m 'not full_run and not regression' --cov=./ --cov-report=xml - name: Upload coverage to Codecov + if: contains(github.ref, 'main') uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} From 1fbe2a9851ada4576af7126b1b896b9ea037f434 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Wed, 15 May 2024 16:20:47 -0400 Subject: [PATCH 3/3] condition on repo --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 9b64e2a..a9af4f6 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -35,7 +35,7 @@ jobs: run: | pytest -m 'not full_run and not regression' --cov=./ --cov-report=xml - name: Upload coverage to Codecov - if: contains(github.ref, 'main') + if: contains(github.repository, 'PSLmodels/InverseOptimalTax') uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }}