From 1d511ed6406ae189712c9c6eb0011eb3b7266751 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 26 Feb 2026 11:30:40 -0700 Subject: [PATCH 1/2] chore: migrate to codecov --- .github/workflows/ci.yml | 29 ++++++++--------------------- README.md | 2 +- justfile | 6 +++--- 3 files changed, 12 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23472eb..ebe6211 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - uses: extractions/setup-just@v3 - uses: actions/setup-go@v6 with: - go-version: '1.25' + go-version: '1.26' # install must occur in the same step as the linter to run properly on CI - name: Lint project run: just install lint @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: ['1.16', '1.17', '1.18', '1.19', '1.20', '1.21', '1.22', '1.23', '1.24', '1.25'] + go-version: ['1.16', '1.17', '1.18', '1.19', '1.20', '1.21', '1.22', '1.23', '1.24', '1.25', '1.26'] steps: - uses: actions/checkout@v6 - uses: extractions/setup-just@v3 @@ -38,24 +38,11 @@ jobs: - uses: extractions/setup-just@v3 - uses: actions/setup-go@v6 with: - go-version: '1.25' - - name: Run coverage report + go-version: '1.26' + - name: Run tests run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just install coverage - coveralls: - if: github.ref == 'refs/heads/master' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: extractions/setup-just@v3 - - uses: actions/setup-go@v6 + - name: Coverage + if: github.ref == 'refs/heads/master' + uses: codecov/codecov-action@v5 with: - # NOTE: goveralls is not compatibile with go v1.22+, must remain on v1.21 max - go-version: '1.21' - - name: Run coverage report - run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just install coverage - - name: Install goveralls - run: go install github.com/mattn/goveralls@latest - - name: Coveralls - env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: goveralls -coverprofile=covprofile -service=github + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/README.md b/README.md index 569d94a..7f74a73 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # EasyPost Go Client Library [![CI](https://github.com/EasyPost/easypost-go/workflows/CI/badge.svg)](https://github.com/EasyPost/easypost-go/actions?query=workflow%3ACI) -[![Coverage Status](https://coveralls.io/repos/github/EasyPost/easypost-go/badge.svg?branch=master)](https://coveralls.io/github/EasyPost/easypost-go?branch=master) +[![codecov](https://codecov.io/gh/EasyPost/easypost-go/graph/badge.svg?token=BW6X4DO2FT)](https://codecov.io/gh/EasyPost/easypost-go) [![GitHub version](https://badge.fury.io/gh/EasyPost%2Feasypost-go.svg)](https://badge.fury.io/gh/EasyPost%2Feasypost-go) [![GoDoc](https://godoc.org/github.com/EasyPost/easypost-go?status.svg)](https://pkg.go.dev/github.com/EasyPost/easypost-go) diff --git a/justfile b/justfile index 7d13c0e..3d4232a 100644 --- a/justfile +++ b/justfile @@ -10,9 +10,9 @@ clean: # Get test coverage and open it in a browser coverage: go clean -testcache - go test -coverprofile=covprofile ./... - bash -c 'statement_cov=$(go tool cover -func=covprofile | grep total: | awk "{print substr(\$NF, 1, length(\$NF)-1)}"); if [ $(echo "$statement_cov < 78.0" | bc) -eq 1 ]; then echo "Tests passed but statement coverage failed with coverage: $statement_cov"; exit 1; fi' - go tool cover -html=covprofile + go test -coverprofile=cover.out ./... + bash -c 'statement_cov=$(go tool cover -func=cover.out | grep total: | awk "{print substr(\$NF, 1, length(\$NF)-1)}"); if [ $(echo "$statement_cov < 78.0" | bc) -eq 1 ]; then echo "Tests passed but statement coverage failed with coverage: $statement_cov"; exit 1; fi' + go tool cover -html=cover.out # Initialize the examples submodule init-examples-submodule: From e8be15005276400701dc25870ba385c47e27477f Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Tue, 3 Mar 2026 15:29:48 -0700 Subject: [PATCH 2/2] fix: lint on CI --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebe6211..a5a08d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,8 @@ jobs: - uses: extractions/setup-just@v3 - uses: actions/setup-go@v6 with: - go-version: '1.26' - # install must occur in the same step as the linter to run properly on CI + # TODO: The version of golangci-lint we use is not compatible with Go 1.26+, migrate to new version + go-version: '1.25' - name: Lint project run: just install lint build: