Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 8 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
- uses: extractions/setup-just@v3
- uses: actions/setup-go@v6
with:
# TODO: The version of golangci-lint we use is not compatible with Go 1.26+, migrate to new version
go-version: '1.25'
# install must occur in the same step as the linter to run properly on CI
- name: Lint project
run: just install lint
build:
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
Expand All @@ -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 }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down