diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 450130448bb2..e919c79241cc 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -23,6 +23,17 @@ jobs: with: go-version: "1.21.0" cache-dependency-path: "**/*.sum" + - name: Cache Go dependencies + uses: actions/cache@v3 + with: + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Set OTEL Exporter Endpoint + run: echo "OTEL_EXPORTER_ENDPOINT=http://172.17.0.1:8080" >> $GITHUB_ENV - name: Run tests run: | cd integration-tests/tests diff --git a/integration-tests/configs/otel-collector-contrib/otel-collector-contrib.yaml b/integration-tests/configs/otel-collector-contrib/otel-collector-contrib.yaml index 451e291defa3..7359cfb35215 100644 --- a/integration-tests/configs/otel-collector-contrib/otel-collector-contrib.yaml +++ b/integration-tests/configs/otel-collector-contrib/otel-collector-contrib.yaml @@ -7,7 +7,7 @@ exporters: logging: otlphttp: - endpoint: http://host.docker.internal:8080 + endpoint: ${OTEL_EXPORTER_ENDPOINT} connectors: diff --git a/integration-tests/tests/docker-compose.yaml b/integration-tests/tests/docker-compose.yaml index 3d4163bfd94b..8d0fb7c72541 100644 --- a/integration-tests/tests/docker-compose.yaml +++ b/integration-tests/tests/docker-compose.yaml @@ -26,6 +26,8 @@ services: ports: - "4317:4317" # OTLP gRPC receiver - "4318:4318" # OTLP HTTP exporter + environment: + - OTEL_EXPORTER_ENDPOINT=${OTEL_EXPORTER_ENDPOINT:-http://host.docker.internal:8080} demo-client: build: diff --git a/integration-tests/tests/run-integration-tests.sh b/integration-tests/tests/run-integration-tests.sh index 81e7cf13541f..9360a613ba30 100755 --- a/integration-tests/tests/run-integration-tests.sh +++ b/integration-tests/tests/run-integration-tests.sh @@ -13,7 +13,7 @@ cleanup() { cat "$logfile" echo "Capturing logs from otel-collector..." docker ps - docker logs tests_otel-collector_1 + docker logs tests_otel-collector_1 || true docker-compose down fi kill $AGENT_PID || true