From 4fea70c1e9d3040ffb4f8f661e1030003172ba82 Mon Sep 17 00:00:00 2001 From: Tom Kennedy Date: Fri, 14 Apr 2023 15:02:11 -0400 Subject: [PATCH 1/2] Remove full ci run for pull requests to main --- .github/workflows/ci.yaml | 3 ++- .github/workflows/unit-test.yaml | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/unit-test.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 357058ee6..d3976389c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,6 @@ on: - release/** pull_request: branches: - - main - release/** defaults: @@ -25,6 +24,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v3 diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml new file mode 100644 index 000000000..860f0a526 --- /dev/null +++ b/.github/workflows/unit-test.yaml @@ -0,0 +1,19 @@ +name: Test + +on: + pull_request: + branches: + - main + +jobs: + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Run tests + uses: ./.github/actions/run-tests + - name: Report coverage + run: bash <(curl -s https://codecov.io/bash) From 9effa0ebc7233905b7579848ba40f108cb7ed2b5 Mon Sep 17 00:00:00 2001 From: Tom Kennedy Date: Fri, 14 Apr 2023 15:42:48 -0400 Subject: [PATCH 2/2] Use codecov action --- .github/workflows/ci.yaml | 4 +--- .github/workflows/unit-test.yaml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d3976389c..27a128005 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,9 +36,7 @@ jobs: run: make unit-ci - name: Report coverage - run: bash <(curl -s https://codecov.io/bash) - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + uses: codecov/codecov-action@v3.1.2 controller-image: runs-on: ubuntu-latest diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index 860f0a526..c7272157b 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -16,4 +16,4 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests - name: Report coverage - run: bash <(curl -s https://codecov.io/bash) + uses: codecov/codecov-action@v3.1.2 \ No newline at end of file