Skip to content

Commit

Permalink
Change CI checkout fetch depth 5 in tests
Browse files Browse the repository at this point in the history
Code coverage requires a fetch depth > 1 to retrieve historical
information.

Signed-off-by: Chris Doherty <chris.doherty4@gmail.com>
  • Loading branch information
chrisdoherty4 committed Apr 29, 2024
1 parent 722a1ea commit f9152b1
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,18 @@ jobs:
- name: Run tests
run: go test -coverprofile=coverage.txt ./...

- name: Upload coverage report (codcov.io)
run: bash <(curl -s https://codecov.io/bash)
- name: Upload codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

integration:
name: Test - Integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 5

- uses: actions/setup-go@v5
with:
Expand All @@ -58,8 +62,10 @@ jobs:
- name: Run integration tests
run: make test-integration

- name: Upload coverage report (codcov.io)
run: bash <(curl -s https://codecov.io/bash)
- name: Upload codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

build:
name: Build
Expand Down Expand Up @@ -90,6 +96,8 @@ jobs:
needs: [test, integration]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 5

- uses: actions/setup-go@v5
with:
Expand All @@ -99,8 +107,10 @@ jobs:
- name: Run end-to-end tests
run: make test-e2e

- name: Upload coverage report (codcov.io)
run: bash <(curl -s https://codecov.io/bash)
- name: Upload codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

package:
name: Package
Expand Down

0 comments on commit f9152b1

Please sign in to comment.