Skip to content

Commit

Permalink
Add e2e workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias committed Dec 7, 2024
1 parent 115d5b6 commit a5e8104
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: e2e

on:
push:
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
pull_request:

jobs:
test:
strategy:
matrix:
library:
- autosdk
- databasesql
- gin
- grpc
- kafka-go
- nethttp
- nethttp_custom
- otelglobal
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Clean
run: |
rm -f ./internal/test/e2e/${{ matrix.library }}/traces{,-orig}.json
touch ./internal/test/e2e/${{ matrix.library }}/traces-orig.json
- name: Run docker-compose
uses: hoverkraft-tech/[email protected]
with:
compose-file: "./internal/test/e2e/${{ matrix.library }}/compose.yaml"
- name: Setup BATS
uses: mig4/setup-bats@af9a00deb21b5d795cabfeaa8d9060410377686d # v1
- name: Verify with BATS
run: bats ./internal/test/e2e/${{ matrix.library }}/verify.bats
3 changes: 3 additions & 0 deletions internal/test/e2e/autosdk/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
context: ../../../../
dockerfile: internal/tools/runner/Dockerfile
image: test-runner:latest
pull_policy: build
entrypoint: ["true"] # service is just used to build image.
autosdk:
build:
Expand All @@ -30,11 +31,13 @@ services:
BASE_IMAGE: "test-runner:latest"
TRIGGER: "signal:SIGCONT"
image: e2e-autosdk:latest
pull_policy: build
depends_on:
- runner
entrypoint: ["true"] # service is just used to build image.
e2e:
image: e2e-autosdk:latest
pull_policy: build
privileged: true
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4318
Expand Down
3 changes: 3 additions & 0 deletions internal/test/e2e/databasesql/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
context: ../../../../
dockerfile: internal/tools/runner/Dockerfile
image: test-runner:latest
pull_policy: build
entrypoint: ["true"] # service is just used to build image.
databasesql:
build:
Expand All @@ -30,11 +31,13 @@ services:
BASE_IMAGE: "test-runner:latest"
TRIGGER: "signal:SIGCONT"
image: e2e-databasesql:latest
pull_policy: build
depends_on:
- runner
entrypoint: ["true"] # service is just used to build image.
e2e:
image: e2e-databasesql:latest
pull_policy: build
privileged: true
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4318
Expand Down
3 changes: 3 additions & 0 deletions internal/test/e2e/gin/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
context: ../../../../
dockerfile: internal/tools/runner/Dockerfile
image: test-runner:latest
pull_policy: build
entrypoint: ["true"] # service is just used to build image.
gin:
build:
Expand All @@ -30,11 +31,13 @@ services:
BASE_IMAGE: "test-runner:latest"
TRIGGER: "signal:SIGCONT"
image: e2e-gin:latest
pull_policy: build
depends_on:
- runner
entrypoint: ["true"] # service is just used to build image.
e2e:
image: e2e-gin:latest
pull_policy: build
privileged: true
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4318
Expand Down
3 changes: 3 additions & 0 deletions internal/test/e2e/grpc/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
context: ../../../../
dockerfile: internal/tools/runner/Dockerfile
image: test-runner:latest
pull_policy: build
entrypoint: ["true"] # service is just used to build image.
grpc:
build:
Expand All @@ -30,11 +31,13 @@ services:
BASE_IMAGE: "test-runner:latest"
TRIGGER: "signal:SIGCONT"
image: e2e-grpc:latest
pull_policy: build
depends_on:
- runner
entrypoint: ["true"] # service is just used to build image.
e2e:
image: e2e-grpc:latest
pull_policy: build
privileged: true
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4318
Expand Down
3 changes: 3 additions & 0 deletions internal/test/e2e/kafka-go/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
context: ../../../../
dockerfile: internal/tools/runner/Dockerfile
image: test-runner:latest
pull_policy: build
entrypoint: ["true"] # service is just used to build image.
kafka-go:
build:
Expand All @@ -30,11 +31,13 @@ services:
BASE_IMAGE: "test-runner:latest"
TRIGGER: "signal:SIGCONT"
image: e2e-kafka-go:latest
pull_policy: build
depends_on:
- runner
entrypoint: ["true"] # service is just used to build image.
e2e:
image: e2e-kafka-go:latest
pull_policy: build
privileged: true
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4318
Expand Down
3 changes: 3 additions & 0 deletions internal/test/e2e/nethttp/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
context: ../../../../
dockerfile: internal/tools/runner/Dockerfile
image: test-runner:latest
pull_policy: build
entrypoint: ["true"] # service is just used to build image.
nethttp:
build:
Expand All @@ -30,11 +31,13 @@ services:
BASE_IMAGE: "test-runner:latest"
TRIGGER: "signal:SIGCONT"
image: e2e-nethttp:latest
pull_policy: build
depends_on:
- runner
entrypoint: ["true"] # service is just used to build image.
e2e:
image: e2e-nethttp:latest
pull_policy: build
privileged: true
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4318
Expand Down
3 changes: 3 additions & 0 deletions internal/test/e2e/nethttp_custom/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
context: ../../../../
dockerfile: internal/tools/runner/Dockerfile
image: test-runner:latest
pull_policy: build
entrypoint: ["true"] # service is just used to build image.
nethttp_custom:
build:
Expand All @@ -30,11 +31,13 @@ services:
BASE_IMAGE: "test-runner:latest"
TRIGGER: "signal:SIGCONT"
image: e2e-nethttp_custom:latest
pull_policy: build
depends_on:
- runner
entrypoint: ["true"] # service is just used to build image.
e2e:
image: e2e-nethttp_custom:latest
pull_policy: build
privileged: true
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4318
Expand Down
3 changes: 3 additions & 0 deletions internal/test/e2e/otelglobal/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
context: ../../../../
dockerfile: internal/tools/runner/Dockerfile
image: test-runner:latest
pull_policy: build
entrypoint: ["true"] # service is just used to build image.
otelglobal:
build:
Expand All @@ -30,11 +31,13 @@ services:
BASE_IMAGE: "test-runner:latest"
TRIGGER: "signal:SIGCONT"
image: e2e-otelglobal:latest
pull_policy: build
depends_on:
- runner
entrypoint: ["true"] # service is just used to build image.
e2e:
image: e2e-otelglobal:latest
pull_policy: build
privileged: true
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4318
Expand Down

0 comments on commit a5e8104

Please sign in to comment.