Skip to content

Commit

Permalink
ci: set GOTOOLCHAIN=local for unit tests
Browse files Browse the repository at this point in the history
Users may build our library with GOTOOLCHAIN=local. If they do, and our
go.mod file specifies a newer Go version than their local toolchain, their
build will break. Run our tests with GOTOOLCHAIN=local to ensure that
our library builds with all of the Go versions we claim to support,
without having to download a newer one.
  • Loading branch information
nsrip-dd committed Aug 29, 2024
1 parent e7ca17e commit e39271d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ jobs:
# Run go mod tidy to ensure that all go.mod and go.sum files are up-to-date.
name: 'go mod tidy smoke test'
runs-on: ubuntu-latest
env:
# Users may build our library with GOTOOLCHAIN=local. If they do, and our
# go.mod file specifies a newer Go version than their local toolchain, their
# build will break. Run our tests with GOTOOLCHAIN=local to ensure that
# our library builds with all of the Go versions we claim to support,
# without having to download a newer one.
GOTOOLCHAIN: local
steps:
- uses: actions/checkout@v4
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/unit-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ on:

env:
DD_APPSEC_WAF_TIMEOUT: 1m # Increase time WAF time budget to reduce CI flakiness
# Users may build our library with GOTOOLCHAIN=local. If they do, and our
# go.mod file specifies a newer Go version than their local toolchain, their
# build will break. Run our tests with GOTOOLCHAIN=local to ensure that
# our library builds with all of the Go versions we claim to support,
# without having to download a newer one.
GOTOOLCHAIN: local

jobs:
copyright:
Expand Down
2 changes: 0 additions & 2 deletions internal/exectracetest/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module gopkg.in/DataDog/dd-trace-go.v1/internal/exectracetest

go 1.21

toolchain go1.21.0

require (
github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b
github.com/mattn/go-sqlite3 v1.14.18
Expand Down

0 comments on commit e39271d

Please sign in to comment.