diff --git a/.circleci/config.yml b/.circleci/config.yml index 086bb5f112..1fb6f99290 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -70,13 +70,33 @@ jobs: test-core: resource_class: xlarge + environment: # environment variables for the build itself + TEST_RESULTS: /tmp/test-results # path to where test results will be saved <<: *plain-go114 steps: - checkout + - run: mkdir -p $TEST_RESULTS + - restore_cache: # restores saved cache if no changes are detected since last run + keys: + - go-mod-v4-{{ checksum "go.sum" }} - run: name: Testing - command: go test -v -race -coverprofile=coverage.txt -covermode=atomic `go list ./... | grep -v /contrib/` + command: | + PACKAGE_NAMES=$(go list ./... | grep -v /contrib/ | circleci tests split --split-by=timings --timings-type=classname) + gotestsum --junitfile ${TEST_RESULTS}/gotestsum-report.xml -- $PACKAGE_NAMES -v -race -coverprofile=coverage.txt -covermode=atomic + + - save_cache: + key: go-mod-v4-{{ checksum "go.sum" }} + paths: + - "/go/pkg/mod" + + - store_artifacts: # upload test summary for display in Artifacts + path: /tmp/test-results + destination: raw-test-output + + - store_test_results: # upload test results for display in Test Summary + path: /tmp/test-results - run: name: Upload coverage report to Codecov @@ -85,6 +105,8 @@ jobs: test-contrib: resource_class: xlarge + environment: # environment variables for the build itself + TEST_RESULTS: /tmp/test-results # path to where test results will be saved working_directory: /home/circleci/dd-trace-go.v1 docker: - image: circleci/golang:1.14 @@ -130,6 +152,10 @@ jobs: steps: - checkout + - run: mkdir -p $TEST_RESULTS + - restore_cache: # restores saved cache if no changes are detected since last run + keys: + - go-mod-v4-{{ checksum "go.sum" }} - restore_cache: keys: @@ -198,7 +224,20 @@ jobs: - run: name: Testing integrations command: | - INTEGRATION=1 go test -v -race -coverprofile=coverage.txt -covermode=atomic `go list ./contrib/... | grep -v -e grpc.v12 -e google.golang.org/api` + PACKAGE_NAMES=$(go list ./contrib/... | grep -v -e grpc.v12 -e google.golang.org/api | circleci tests split --split-by=timings --timings-type=classname) + gotestsum --junitfile ${TEST_RESULTS}/gotestsum-report.xml -- $PACKAGE_NAMES -v -race -coverprofile=coverage.txt -covermode=atomic + + - save_cache: + key: go-mod-v4-{{ checksum "go.sum" }} + paths: + - "/go/pkg/mod" + + - store_artifacts: # upload test summary for display in Artifacts + path: /tmp/test-results + destination: raw-test-output + + - store_test_results: # upload test results for display in Test Summary + path: /tmp/test-results - run: name: Testing outlier google.golang.org/api diff --git a/contrib/gofiber/fiber.v2/fiber.go b/contrib/gofiber/fiber.v2/fiber.go index 5054ee4c62..24da04ab92 100644 --- a/contrib/gofiber/fiber.v2/fiber.go +++ b/contrib/gofiber/fiber.v2/fiber.go @@ -43,7 +43,6 @@ func Middleware(opts ...Option) func(c *fiber.Ctx) error { opts = append(opts, cfg.spanOpts...) span, _ := tracer.StartSpanFromContext(c.Context(), "http.request", opts...) - fmt.Printf("Starting Span") defer span.Finish() resourceName := c.Path()