Skip to content

Commit

Permalink
Update syntax and conditionals in CI workflow
Browse files Browse the repository at this point in the history
The syntax of Go versions in the CI matrix has been updated to encapsulate the versions in quotes. The conditions for triggering the Codecov upload has been adjusted to reflect these changes, ensuring the coverage is only uploaded when the tests pass with the '1.21' Go version on the 'ubuntu-latest' platform.
  • Loading branch information
wneessen committed Dec 14, 2023
1 parent 500168e commit b60f704
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: ["1.19", "1.20", "1.21"]
go: [1.19, '1.20', '1.21']
steps:
- name: Checkout Code
uses: actions/checkout@master
Expand All @@ -37,9 +37,8 @@ jobs:
- name: Run Tests
run: |
go test -v -race --coverprofile=coverage.coverprofile --covermode=atomic ./...
- name: Upload coverage to Codecov
if: success() && matrix.go == "1.21" && matrix.os == "ubuntu-latest"
if: success() && matrix.go == '1.21' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos

0 comments on commit b60f704

Please sign in to comment.