Skip to content

Commit

Permalink
Run tests with Java 18 (open-telemetry#4396)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraaga authored Apr 20, 2022
1 parent 2ec053e commit 0c0c8c0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 31 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
- 8
- 11
- 17
- 18
# Collect coverage on latest LTS
include:
- os: ubuntu-20.04
test-java-version: 17
Expand All @@ -30,23 +32,15 @@ jobs:
with:
fetch-depth: 0

- id: setup-java-8
name: Set up Java 8 for tests
- id: setup-java-test
name: Set up Java ${{ matrix.test-java-version }} for tests
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
java-package: jre
java-version: ${{ matrix.test-java-version }}

- id: setup-java-11
name: Set up Java 11 for tests
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- id: setup-java-17
name: Set up Java 17
- id: setup-java
name: Set up Java for build
uses: actions/setup-java@v3
with:
distribution: temurin
Expand All @@ -58,7 +52,7 @@ jobs:
build
${{ matrix.coverage && 'jacocoTestReport' || '' }}
-PtestJavaVersion=${{ matrix.test-java-version }}
-Porg.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-11.outputs.path }},${{ steps.setup-java-16.outputs.path }},${{ steps.setup-java-17.outputs.path }}
-Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }},${{ steps.setup-java.outputs.path }}
- uses: codecov/codecov-action@v3
if: ${{ matrix.coverage }}

Expand Down
26 changes: 10 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
- 8
- 11
- 17
- 18
# Collect coverage on latest LTS
include:
- os: ubuntu-20.04
test-java-version: 17
Expand All @@ -30,23 +32,15 @@ jobs:
with:
fetch-depth: 0

- id: setup-java-8
name: Set up Java 8 for tests
- id: setup-java-test
name: Set up Java ${{ matrix.test-java-version }} for tests
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
java-package: jre
java-version: ${{ matrix.test-java-version }}

- id: setup-java-11
name: Set up Java 11 for tests
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- id: setup-java-17
name: Set up Java 17
- id: setup-java
name: Set up Java for build
uses: actions/setup-java@v3
with:
distribution: temurin
Expand All @@ -58,7 +52,7 @@ jobs:
build
${{ matrix.coverage && 'jacocoTestReport' || '' }}
-PtestJavaVersion=${{ matrix.test-java-version }}
-Porg.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-11.outputs.path }},${{ steps.setup-java-17.outputs.path }}
-Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }},${{ steps.setup-java.outputs.path }}
- uses: codecov/codecov-action@v3
if: ${{ matrix.coverage }}
Expand Down Expand Up @@ -91,8 +85,8 @@ jobs:
with:
fetch-depth: 0

- id: setup-java-11
name: Set up Java 11
- id: setup-java
name: Set up Java
uses: actions/setup-java@v3
with:
distribution: temurin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

jacoco {
toolVersion = "0.8.7"
toolVersion = "0.8.8"
}

// https://docs.gradle.org/current/samples/sample_jvm_multi_project_with_code_coverage.html
Expand Down

0 comments on commit 0c0c8c0

Please sign in to comment.