Skip to content

Commit

Permalink
chore: use ubuntu-16-core-latest runner for linux integration tests (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainMuller authored Oct 30, 2024
1 parent 254be95 commit b61a190
Show file tree
Hide file tree
Showing 94 changed files with 326 additions and 239 deletions.
28 changes: 7 additions & 21 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ jobs:
needs: generate
runs-on: ubuntu-latest
strategy:
fail-fast: false
fail-fast: ${{ github.event_name == 'merge_group' }}
matrix:
go-version: [oldstable, stable]
name: Unit tests (go ${{ matrix.go-version }})
Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:
integration-tests:
needs: generate
strategy:
fail-fast: false
fail-fast: ${{ github.event_name == 'merge_group' }}
matrix:
runs-on: [macos, ubuntu, windows]
go-version: [oldstable, stable]
Expand All @@ -287,26 +287,12 @@ jobs:
- runs-on: ubuntu
go-version: oldstable
build-mode: GOFLAGS
runs-on: ${{ matrix.runs-on == 'ubuntu' && 'arm-4core-linux' || format('{0}-latest', matrix.runs-on) }}
runs-on: ${{ matrix.runs-on == 'ubuntu' && fromJson('{"labels":"ubuntu-16-core-latest","group":"Large Runner Shared Public"}') || format('{0}-latest', matrix.runs-on) }}
env:
# Ryuk is problematic with concurrent executions, and unnecessary in ephemeral environments like GHA.
TESTCONTAINERS_RYUK_DISABLED: true
name: Integration tests (go ${{ matrix.go-version }}, ${{ matrix.runs-on }}, ${{ matrix.build-mode }})
steps:
- name: Start docker daemon (arm-4core-linux only)
if: matrix.runs-on == 'ubuntu'
run: |-
sudo apt update
sudo apt install -y build-essential ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo chown root:$(groups | cut -d' ' -f1) /var/run/docker.sock
echo "DOCKER_DEFAULT_PLATFORM=linux/arm64" >> "${GITHUB_ENV}"
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Setup go
Expand Down Expand Up @@ -358,7 +344,7 @@ jobs:
esac
env:
GOCOVERDIR: ${{ github.workspace }}/coverage/raw
GOFLAGS: -tags=integration,buildtag # Globally set build tags (buildtag is used by the dd-span test)
GOFLAGS: ${{ matrix.runs-on == 'ubuntu' && '-p=4' || ''}} -tags=integration,buildtag # Globally set build tags (buildtag is used by the dd-span test)
- name: Consolidate coverage report
if: github.event_name != 'merge_group' && !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork)
run: go tool covdata textfmt -i ./coverage/raw -o ./coverage/integration.out
Expand Down
20 changes: 10 additions & 10 deletions _integration-tests/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module orchestrion/integration
module datadoghq.dev/orchestrion/_integration-tests

go 1.22.8

Expand Down Expand Up @@ -40,15 +40,15 @@ require (
github.com/mattn/go-sqlite3 v1.14.22
github.com/redis/go-redis/v9 v9.7.0
github.com/stretchr/testify v1.9.0
github.com/testcontainers/testcontainers-go v0.33.0
github.com/testcontainers/testcontainers-go/modules/cassandra v0.33.0
github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.33.0
github.com/testcontainers/testcontainers-go/modules/gcloud v0.33.0
github.com/testcontainers/testcontainers-go/modules/kafka v0.33.0
github.com/testcontainers/testcontainers-go/modules/mongodb v0.32.0
github.com/testcontainers/testcontainers-go/modules/postgres v0.33.0
github.com/testcontainers/testcontainers-go/modules/redis v0.33.0
github.com/testcontainers/testcontainers-go/modules/vault v0.32.0
github.com/testcontainers/testcontainers-go v0.34.0
github.com/testcontainers/testcontainers-go/modules/cassandra v0.34.0
github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.34.0
github.com/testcontainers/testcontainers-go/modules/gcloud v0.34.0
github.com/testcontainers/testcontainers-go/modules/kafka v0.34.0
github.com/testcontainers/testcontainers-go/modules/mongodb v0.34.0
github.com/testcontainers/testcontainers-go/modules/postgres v0.34.0
github.com/testcontainers/testcontainers-go/modules/redis v0.34.0
github.com/testcontainers/testcontainers-go/modules/vault v0.34.0
github.com/tinylib/msgp v1.2.2
github.com/vektah/gqlparser/v2 v2.5.18
github.com/xlab/treeprint v1.2.0
Expand Down
36 changes: 18 additions & 18 deletions _integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1611,24 +1611,24 @@ github.com/tdewolff/parse/v2 v2.7.18/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W
github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 h1:IkjBCtQOOjIn03u/dMQK9g+Iw9ewps4mCl1nB8Sscbo=
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739/go.mod h1:XPuWBzvdUzhCuxWO1ojpXsyzsA5bFoS3tO/Q3kFuTG8=
github.com/testcontainers/testcontainers-go v0.33.0 h1:zJS9PfXYT5O0ZFXM2xxXfk4J5UMw/kRiISng037Gxdw=
github.com/testcontainers/testcontainers-go v0.33.0/go.mod h1:W80YpTa8D5C3Yy16icheD01UTDu+LmXIA2Keo+jWtT8=
github.com/testcontainers/testcontainers-go/modules/cassandra v0.33.0 h1:Bpgl1+KQernz/8j6jwFZt3sDK7o9jCDaa3pVmQNJEU4=
github.com/testcontainers/testcontainers-go/modules/cassandra v0.33.0/go.mod h1:N6PuXZPZSUPioP8u5X67M8rPScL852hpZSMm8TDD3Tg=
github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.33.0 h1:tVsooNzk7SgYDO1OnqeIgihDYiD/vSBNBqwqCfauIJY=
github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.33.0/go.mod h1:qmspvRf+Hx0iyqKQUmTg1jTNiO7HHGNrx98t/HksVfg=
github.com/testcontainers/testcontainers-go/modules/gcloud v0.33.0 h1:0dLRqvSBSlWNZyJKRg9z0RjbnD2mF5CvzQi0M6a7oWM=
github.com/testcontainers/testcontainers-go/modules/gcloud v0.33.0/go.mod h1:Lws7N+bAoAWEECrUZrku5T2T7i4GNj7UaVi1k/wZznU=
github.com/testcontainers/testcontainers-go/modules/kafka v0.33.0 h1:Zug/9wK9tE9NdJ/sy27XbIvIVjXsD7rXrcV5B3KVrOM=
github.com/testcontainers/testcontainers-go/modules/kafka v0.33.0/go.mod h1:J8NhxBCTnivcTANoNpuMnOEkdKf/x9zwZ434Y4dbIH4=
github.com/testcontainers/testcontainers-go/modules/mongodb v0.32.0 h1:DvmvHV1irfNIVBhixeTAcoaWCvmdkoNQxRmZisqic4E=
github.com/testcontainers/testcontainers-go/modules/mongodb v0.32.0/go.mod h1:z0ZvM2V2iThZGrzEN6sddJpvnGhJd6O1O0FTFoZXmpk=
github.com/testcontainers/testcontainers-go/modules/postgres v0.33.0 h1:c+Gt+XLJjqFAejgX4hSpnHIpC9eAhvgI/TFWL/PbrFI=
github.com/testcontainers/testcontainers-go/modules/postgres v0.33.0/go.mod h1:I4DazHBoWDyf69ByOIyt3OdNjefiUx372459txOpQ3o=
github.com/testcontainers/testcontainers-go/modules/redis v0.33.0 h1:S/QvMOwpr00MM2aWH+krzP73Erlp/Ug0dr2rkgZYI5s=
github.com/testcontainers/testcontainers-go/modules/redis v0.33.0/go.mod h1:gudb3+6uZ9SsAysOVoLs7nazbjGlkHegBW8nqPXvDMI=
github.com/testcontainers/testcontainers-go/modules/vault v0.32.0 h1:ae/zLTcf7is6m2kLAzOJmO5O2Dy/zZV/KZRx6Wx63bw=
github.com/testcontainers/testcontainers-go/modules/vault v0.32.0/go.mod h1:IOiaemn5bDfDPa8120qECKKKtoOQqKaIKo9pW4bMMes=
github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo=
github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ=
github.com/testcontainers/testcontainers-go/modules/cassandra v0.34.0 h1:Ec0zO9BlbWSFzvnZEnM5J2B/2ohkvvtIZ4y5+jwg1jM=
github.com/testcontainers/testcontainers-go/modules/cassandra v0.34.0/go.mod h1:75Xuwl/2Kf0YKFlxiqqeR8dRIkRoY87F6MCLa4v2jPU=
github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.34.0 h1:BBwJUs9xBpt1uOfO+yAr2pYW75MsyzuO/o70HTPnhe4=
github.com/testcontainers/testcontainers-go/modules/elasticsearch v0.34.0/go.mod h1:OqhRGYR+5VG0Dw506F6Ho9I4YG1kB+o9uPTKC0uPUA8=
github.com/testcontainers/testcontainers-go/modules/gcloud v0.34.0 h1:TFwn4HWRojIp2sgzgrky126UEx3e7zH/N/U5UY/kb5c=
github.com/testcontainers/testcontainers-go/modules/gcloud v0.34.0/go.mod h1:X8LNcXdN2Vey2mC4XbpcCBzUeA0KGDnx1ibDRhKN+Ko=
github.com/testcontainers/testcontainers-go/modules/kafka v0.34.0 h1:LrMlsBH+nKJ2c6M7rOjbi7UivgofgAQo+LAwsWttR+Q=
github.com/testcontainers/testcontainers-go/modules/kafka v0.34.0/go.mod h1:4BIbeoKY/ZAf86MvWT5xJW5TvxbCPg67I5rBvwFsx4A=
github.com/testcontainers/testcontainers-go/modules/mongodb v0.34.0 h1:o3bgcECyBFfMwqexCH/6vIJ8XzbCffCP/Euesu33rgY=
github.com/testcontainers/testcontainers-go/modules/mongodb v0.34.0/go.mod h1:ljLR42dN7k40CX0dp30R8BRIB3OOdvr7rBANEpfmMs4=
github.com/testcontainers/testcontainers-go/modules/postgres v0.34.0 h1:c51aBXT3v2HEBVarmaBnsKzvgZjC5amn0qsj8Naqi50=
github.com/testcontainers/testcontainers-go/modules/postgres v0.34.0/go.mod h1:EWP75ogLQU4M4L8U+20mFipjV4WIR9WtlMXSB6/wiuc=
github.com/testcontainers/testcontainers-go/modules/redis v0.34.0 h1:HkkKZPi6W2I+ywqplvnKOYRBKXQgpdxErBbdgx8F8nw=
github.com/testcontainers/testcontainers-go/modules/redis v0.34.0/go.mod h1:iUkbN75F4E8WC5C1MfHbGOHOuKU7gOJfHjtwMT8G9QE=
github.com/testcontainers/testcontainers-go/modules/vault v0.34.0 h1:Tqkst2qEkWmdmdi8r8NG1v+B9DWktOYDNYW6ORapLNQ=
github.com/testcontainers/testcontainers-go/modules/vault v0.34.0/go.mod h1:DdONZFyJ8NgcMrV88wut/aMvGmCtUbY4IwcJt6OTxis=
github.com/tetratelabs/wazero v1.8.1 h1:NrcgVbWfkWvVc4UtT4LRLDf91PsOzDzefMdwhLfA550=
github.com/tetratelabs/wazero v1.8.1/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs=
github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U=
Expand Down
2 changes: 1 addition & 1 deletion _integration-tests/tests/99designs.gqlgen/gen_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ resolver:
# gqlgen will search for any type names in the schema in these go packages
# if they match it will use them, otherwise it will generate them.
autobind:
# - "orchestrion/integration/tests/99designs.gqlgen/generated/graph/model"
# - "datadoghq.dev/orchestrion/_integration-tests/tests/99designs.gqlgen/generated/graph/model"

# This section declares type mapping between the GraphQL and go type systems
#
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions _integration-tests/tests/99designs.gqlgen/gqlgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ import (
"fmt"
"testing"

"orchestrion/integration/tests/99designs.gqlgen/generated/graph"
"orchestrion/integration/validator/trace"

"datadoghq.dev/orchestrion/_integration-tests/tests/99designs.gqlgen/generated/graph"
"datadoghq.dev/orchestrion/_integration-tests/validator/trace"
"github.com/99designs/gqlgen/client"
"github.com/99designs/gqlgen/graphql/handler"
"github.com/99designs/gqlgen/graphql/handler/transport"
Expand Down
7 changes: 4 additions & 3 deletions _integration-tests/tests/aws.v1/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ import (
"testing"
"time"

"datadoghq.dev/orchestrion/_integration-tests/utils"
"datadoghq.dev/orchestrion/_integration-tests/validator/trace"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/stretchr/testify/require"
"github.com/testcontainers/testcontainers-go"

"orchestrion/integration/utils"
"orchestrion/integration/validator/trace"
)

type TestCase struct {
Expand All @@ -30,6 +29,8 @@ type TestCase struct {
}

func (tc *TestCase) Setup(t *testing.T) {
utils.SkipIfProviderIsNotHealthy(t)

server, host, port := utils.StartDynamoDBTestContainer(t)
tc.server = server

Expand Down
2 changes: 1 addition & 1 deletion _integration-tests/tests/aws.v1/gen_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions _integration-tests/tests/aws.v2/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ import (
"testing"
"time"

"datadoghq.dev/orchestrion/_integration-tests/utils"
"datadoghq.dev/orchestrion/_integration-tests/validator/trace"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/dynamodb"
"github.com/stretchr/testify/require"
"github.com/testcontainers/testcontainers-go"

"orchestrion/integration/utils"
"orchestrion/integration/validator/trace"
)

type base struct {
Expand All @@ -30,6 +29,8 @@ type base struct {
}

func (b *base) setup(t *testing.T) {
utils.SkipIfProviderIsNotHealthy(t)

b.server, b.host, b.port = utils.StartDynamoDBTestContainer(t)
}

Expand Down
2 changes: 1 addition & 1 deletion _integration-tests/tests/aws.v2/gen_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions _integration-tests/tests/aws.v2/load_default_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ import (
"fmt"
"testing"

"datadoghq.dev/orchestrion/_integration-tests/validator/trace"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/stretchr/testify/require"

"orchestrion/integration/validator/trace"
)

type TestCaseLoadDefaultConfig struct {
Expand Down
3 changes: 1 addition & 2 deletions _integration-tests/tests/aws.v2/new_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import (
"fmt"
"testing"

"orchestrion/integration/validator/trace"

"datadoghq.dev/orchestrion/_integration-tests/validator/trace"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/credentials"
)
Expand Down
3 changes: 1 addition & 2 deletions _integration-tests/tests/aws.v2/struct_literal.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import (
"fmt"
"testing"

"datadoghq.dev/orchestrion/_integration-tests/validator/trace"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/credentials"

"orchestrion/integration/validator/trace"
)

type TestCaseStructLiteral struct {
Expand Down
3 changes: 1 addition & 2 deletions _integration-tests/tests/aws.v2/struct_literal_ptr.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import (
"fmt"
"testing"

"datadoghq.dev/orchestrion/_integration-tests/validator/trace"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/credentials"

"orchestrion/integration/validator/trace"
)

type TestCaseStructLiteralPtr struct {
Expand Down
5 changes: 2 additions & 3 deletions _integration-tests/tests/chi.v5/chi.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ import (
"testing"
"time"

"datadoghq.dev/orchestrion/_integration-tests/utils"
"datadoghq.dev/orchestrion/_integration-tests/validator/trace"
"github.com/go-chi/chi/v5"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"orchestrion/integration/utils"
"orchestrion/integration/validator/trace"
)

type TestCase struct {
Expand Down
2 changes: 1 addition & 1 deletion _integration-tests/tests/chi.v5/gen_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _integration-tests/tests/civisibility/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestMain(m *testing.M) {
// module event
events.
CheckEventsByType("test_module_end", 1).
CheckEventsByResourceName("orchestrion/integration/tests/civisibility", 1)
CheckEventsByResourceName("datadoghq.dev/orchestrion/_integration-tests/tests/civisibility", 1)

// test suite event
events.CheckEventsByType("test_suite_end", 1).
Expand Down
2 changes: 1 addition & 1 deletion _integration-tests/tests/dd-span/gen_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _integration-tests/tests/dd-span/no-tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
package ddspan

import (
"orchestrion/integration/validator/trace"
"datadoghq.dev/orchestrion/_integration-tests/validator/trace"
)

func (*TestCase) ExpectedTraces() trace.Traces {
Expand Down
3 changes: 2 additions & 1 deletion _integration-tests/tests/dd-span/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ package ddspan

import (
"errors"
"orchestrion/integration/validator/trace"

"datadoghq.dev/orchestrion/_integration-tests/validator/trace"
)

func (tc *TestCase) ExpectedTraces() trace.Traces {
Expand Down
5 changes: 2 additions & 3 deletions _integration-tests/tests/echo.v4/echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ import (
"testing"
"time"

"datadoghq.dev/orchestrion/_integration-tests/utils"
"datadoghq.dev/orchestrion/_integration-tests/validator/trace"
"github.com/labstack/echo/v4"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"orchestrion/integration/utils"
"orchestrion/integration/validator/trace"
)

type TestCase struct {
Expand Down
2 changes: 1 addition & 1 deletion _integration-tests/tests/echo.v4/gen_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b61a190

Please sign in to comment.