diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 82b62777..c2427d33 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -381,3 +381,40 @@ jobs: - name: Docker logout run: docker logout + + benchmark: + runs-on: ubuntu-latest + needs: + - s3-stage-upload + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Docker login + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Benchmark test + working-directory: benchmark + run: ./gradlew test + + - uses: actions/upload-artifact@v4 + with: + path: benchmark/results/release/summary.txt + name: benchmark-summary + + - uses: actions/upload-artifact@v4 + if: always() + with: + path: benchmark/build/reports/tests/test/ + name: benchmark-test + + - name: Docker logout + run: docker logout diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eac5b8de..c52931e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -285,35 +285,3 @@ jobs: with: path: arns.txt name: arns - - benchmark: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - - name: Docker login - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin - - - name: Benchmark test - run: | - cd benchmark - ./gradlew test - - - uses: actions/upload-artifact@v4 - with: - path: benchmark/results/release/summary.txt - name: benchmark-summary - - - uses: actions/upload-artifact@v4 - with: - path: benchmark/build/reports/tests/test/ - name: benchmark-test - - - name: Docker logout - run: docker logout diff --git a/benchmark/src/test/java/io/opentelemetry/containers/AOTestCollectorContainer.java b/benchmark/src/test/java/io/opentelemetry/containers/AOTestCollectorContainer.java index 6c944f75..6f1670f2 100644 --- a/benchmark/src/test/java/io/opentelemetry/containers/AOTestCollectorContainer.java +++ b/benchmark/src/test/java/io/opentelemetry/containers/AOTestCollectorContainer.java @@ -15,15 +15,6 @@ public class AOTestCollectorContainer { private static final Logger logger = LoggerFactory.getLogger(CollectorContainer.class); - static { - // needs to be executed, before Docker images are resolved - if (System.getenv("GITHUB_USERNAME") != null && System.getenv("GITHUB_TOKEN") != null) { - System.setProperty("registry.username", System.getenv("GITHUB_USERNAME")); - System.setProperty("registry.password", System.getenv("GITHUB_TOKEN")); - } else { - throw new RuntimeException("GP_USERNAME and GP_TOKEN are needed."); - } - } public static GenericContainer build(Network network) { return new GenericContainer<>(