Skip to content

Commit

Permalink
chore: move integration tests into Go
Browse files Browse the repository at this point in the history
This will make extending it a bit simpler and more accessible.
  • Loading branch information
alecthomas committed Nov 29, 2023
1 parent d7cbc07 commit 4ae906d
Show file tree
Hide file tree
Showing 9 changed files with 264 additions and 169 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/autofmt.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
on:
pull_request:
name: Auto-format
concurrency:
group: ${{ github.ref }}-autofmt
cancel-in-progress: true
jobs:
format:
# Check if the PR is not from a fork
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
on:
pull_request:
workflow_call:
concurrency:
group: ${{ github.ref }}-integration
cancel-in-progress: true
name: Integration
jobs:
integration:
Expand All @@ -15,8 +19,18 @@ jobs:
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go
key: ${{ runner.os }}-go-${{ hashFiles('**/go.mod') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Docker Compose
run: docker compose up -d --wait
- name: Download Go Modules
run: go mod download
- name: Integration tests
run: integration-tests
run: go test -v -tags integration ./integration
6 changes: 3 additions & 3 deletions examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ require (
go.opentelemetry.io/otel v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
)
16 changes: 8 additions & 8 deletions examples/go.sum

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

6 changes: 3 additions & 3 deletions examples/online-boutique/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/alecthomas/errors v0.4.0
github.com/google/uuid v1.4.0
github.com/hashicorp/golang-lru/v2 v2.0.5
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
golang.org/x/exp v0.0.0-20231127185646-65229373498e
)

require (
Expand All @@ -36,9 +36,9 @@ require (
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
)
16 changes: 8 additions & 8 deletions examples/online-boutique/go.sum

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

10 changes: 0 additions & 10 deletions go.sum

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

Loading

0 comments on commit 4ae906d

Please sign in to comment.