Skip to content

Commit

Permalink
feat: Enabling go 1.12 in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosroman committed Jun 21, 2022
1 parent adf7e06 commit 11aa8bc
Show file tree
Hide file tree
Showing 24 changed files with 84 additions and 8 deletions.
10 changes: 9 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ commands:
- run: go vet ./statsd/...
- run: go fmt ./statsd/...
- run: go test -v ./statsd/...
- run: go run -v ./example

jobs:
# Those allow us to have the os name in the job name. 'matrix' don't add static parameters to the name in the circleci
Expand All @@ -72,4 +73,11 @@ workflows:
- tests_arm64:
matrix:
parameters:
go-version: ["1.13", "1.14", "1.15", "1.16", "1.17", "1.18"]
go-version:
- "1.12"
- "1.13"
- "1.14"
- "1.15"
- "1.16"
- "1.17"
- "1.18"
15 changes: 13 additions & 2 deletions .github/workflows/datadog-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,18 @@ jobs:
native:
strategy:
matrix:
go-version: [ 1.18, 1.17, 1.16, 1.15, 1.14, 1.13]
runs-on: [ ubuntu-latest, windows-latest, macos-latest ]
go-version:
- 1.18
- 1.17
- 1.16
- 1.15
- 1.14
- 1.13
- 1.12
runs-on:
- ubuntu-latest
- windows-latest
- macos-latest
fail-fast: false
runs-on: ${{ matrix.runs-on }}
steps:
Expand All @@ -22,3 +32,4 @@ jobs:
- run: go vet ./statsd/...
- run: go fmt ./statsd/...
- run: go test -race -v ./statsd/...
- run: go run -v ./example
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/DataDog/datadog-go/v5

go 1.13
go 1.12

require (
github.com/Microsoft/go-winio v0.5.0
Expand Down
3 changes: 3 additions & 0 deletions statsd/aggregator_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/buffer_pool_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/buffer_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/container_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/end_to_end_udp_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 2 additions & 1 deletion statsd/end_to_end_uds_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build !windows
//go:build go1.13
// +build go1.13

package statsd

Expand Down
3 changes: 3 additions & 0 deletions statsd/event_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/format_benchmark_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/format_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/metrics_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/noop_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/options_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 2 additions & 1 deletion statsd/pipe_windows_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package statsd
Expand All @@ -21,7 +22,7 @@ func createNamedPipe(t *testing.T) (string, *os.File, net.Listener) {
pipepath := WindowsPipeAddressPrefix + f.Name()
ln, err := winio.ListenPipe(pipepath, &winio.PipeConfig{
SecurityDescriptor: "D:AI(A;;GA;;;WD)",
InputBufferSize: 1_000_000,
InputBufferSize: 1000000,
})
if err != nil {
os.Remove(f.Name())
Expand Down
3 changes: 3 additions & 0 deletions statsd/sender_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/service_check_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/statsd_benchmark_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd_test

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/statsd_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/telemetry_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 3 additions & 0 deletions statsd/test_helpers_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand Down
3 changes: 2 additions & 1 deletion statsd/uds_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build !windows
//go:build go1.13
// +build go1.13

package statsd

Expand Down
5 changes: 4 additions & 1 deletion statsd/worker_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build go1.13
// +build go1.13

package statsd

import (
Expand All @@ -9,7 +12,7 @@ import (

func TestShouldSample(t *testing.T) {
rates := []float64{0.01, 0.05, 0.1, 0.25, 0.5, 0.75, 0.9, 0.99, 1.0}
iterations := 50_000
iterations := 50000

for _, rate := range rates {
rate := rate // Capture range variable.
Expand Down

0 comments on commit 11aa8bc

Please sign in to comment.