@@ -29,51 +29,68 @@ jobs:
2929 java-version : 17
3030
3131 - name : Set up gradle
32- uses : gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0
32+ uses : gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
3333 with :
3434 cache-read-only : ${{ github.event_name == 'pull_request' }}
3535 - name : Gradle build and test
3636 run : ./gradlew build -x test
3737
3838 test :
39- name : test (${{ matrix.test-java-version }})
40- runs-on : ubuntu-latest
39+ name : Test
40+ runs-on : ${{ matrix.os }}
4141 strategy :
42+ fail-fast : false
4243 matrix :
44+ os :
45+ - macos-latest
46+ - macos-13
47+ - ubuntu-latest
48+ - windows-latest
4349 test-java-version :
4450 - 8
4551 - 11
4652 - 17
4753 - 21
4854 - 23
49- fail-fast : false
55+ # macos-latest drops support for java 8 temurin. Run java 8 on macos-13. Run java 11, 17, 21 on macos-latest.
56+ exclude :
57+ - os : macos-latest
58+ test-java-version : 8
59+ - os : macos-13
60+ test-java-version : 11
61+ - os : macos-13
62+ test-java-version : 17
63+ - os : macos-13
64+ test-java-version : 21
65+ - os : macos-13
66+ test-java-version : 23
5067 steps :
5168 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5269
53- - id : setup-test- java
54- name : Set up JDK ${{ matrix.test-java-version }} for running tests
70+ - id : setup-java-test
71+ name : Set up Java ${{ matrix.test-java-version }} for tests
5572 uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
5673 with :
57- # using zulu because new releases get published quickly
58- distribution : zulu
74+ distribution : temurin
5975 java-version : ${{ matrix.test-java-version }}
6076
61- - name : Set up JDK for running Gradle
77+ - id : setup-java
78+ name : Set up Java for build
6279 uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
6380 with :
6481 distribution : temurin
6582 java-version : 17
6683
6784 - name : Set up gradle
68- uses : gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0
85+ uses : gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
6986 with :
7087 cache-read-only : ${{ github.event_name == 'pull_request' }}
7188 - name : Gradle test
7289 run : >
7390 ./gradlew test
74- -PtestJavaVersion=${{ matrix.test-java-version }}
75- -Porg.gradle.java.installations.paths=${{ steps.setup-test- java.outputs.path }}
76- -Porg.gradle.java.installations.auto-download=false
91+ " -PtestJavaVersion=${{ matrix.test-java-version }}"
92+ " -Porg.gradle.java.installations.paths=${{ steps.setup-java-test .outputs.path }}"
93+ " -Porg.gradle.java.installations.auto-download=false"
7794
7895 integration-test :
7996 runs-on : ubuntu-latest
87104 java-version : 17
88105
89106 - name : Set up gradle
90- uses : gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0
107+ uses : gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
91108 with :
92109 cache-read-only : ${{ github.event_name == 'pull_request' }}
93110
@@ -101,8 +118,12 @@ jobs:
101118 name : integration-test-results
102119 path : jmx-metrics/build/reports/tests/integrationTest
103120
104- markdown-link-check :
105- uses : ./.github/workflows/reusable-markdown-link-check.yml
121+ link-check :
122+ # release branches are excluded to avoid unnecessary maintenance if external links break
123+ # (and also because the README.md might need update on release branches before the release
124+ # download has been published)
125+ if : " !startsWith(github.ref_name, 'release/')"
126+ uses : ./.github/workflows/reusable-link-check.yml
106127
107128 markdown-lint-check :
108129 uses : ./.github/workflows/reusable-markdown-lint.yml
@@ -125,7 +146,7 @@ jobs:
125146 # and so would not short-circuit if used in the second-last position
126147 name : publish-snapshots${{ (github.ref_name != 'main' || github.repository != 'open-telemetry/opentelemetry-java-contrib') && ' (skipped)' || '' }}
127148 needs :
128- # intentionally not blocking snapshot publishing on markdown- link-check or misspell-check
149+ # intentionally not blocking snapshot publishing on link-check or misspell-check
129150 - build
130151 - integration-test
131152 runs-on : ubuntu-latest
@@ -139,7 +160,7 @@ jobs:
139160 java-version : 17
140161
141162 - name : Set up gradle
142- uses : gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0
163+ uses : gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
143164 # skipping release branches because the versions in those branches are not snapshots
144165 # (also this skips pull requests)
145166 if : ${{ github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java-contrib' }}
0 commit comments