Skip to content

Commit a4cc954

Browse files
committed
Fix tests to run with matrix version, not just 8
1 parent 50d9d2f commit a4cc954

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/tests.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,26 @@ jobs:
1111
java-vendor: ['zulu', 'temurin', 'corretto']
1212
steps:
1313
- uses: actions/checkout@v6
14+
- name: Build with ${{ matrix.java-vendor }} 17 and run tests with ${{ matrix.java-vendor }} 8
15+
if: ${{ matrix.java-version == 8 }}
16+
uses: Unidata/thredds-test-action@v4
17+
with:
18+
java-vendor: ${{ matrix.java-vendor }}
19+
java-version: 17
20+
build-tool: 'gradlew'
21+
test-command: '-Dorg.gradle.java.installations.fromEnv=TEST_JDK --info --stacktrace test'
22+
env:
23+
TEST_JDK: /usr/thredds-test-environment/${{ matrix.java-vendor }}8
1424
- name: Build with ${{ matrix.java-vendor }} 17 and run tests with ${{ matrix.java-vendor }} ${{ matrix.java-version }}
25+
if: ${{ matrix.java-version != 8 }}
1526
uses: Unidata/thredds-test-action@v4
1627
with:
1728
java-vendor: ${{ matrix.java-vendor }}
1829
java-version: 17
1930
build-tool: 'gradlew'
20-
test-command: '-Dorg.gradle.java.installations.fromEnv=JDK8 --info --stacktrace test'
31+
test-command: '-Dorg.gradle.java.installations.fromEnv=TEST_JDK --info --stacktrace testWithJdk${{ matrix.java-version }}'
2132
env:
22-
JDK8: /usr/thredds-test-environment/${{ matrix.java-vendor }}8
33+
TEST_JDK: /usr/thredds-test-environment/${{ matrix.java-vendor }}${{ matrix.java-version }}
2334
- name: Cleanup build-logic-ncj build directory
2435
if: failure()
2536
run: sudo rm -rf build-logic-ncj/build/

0 commit comments

Comments
 (0)