Skip to content

Commit 6bda5f9

Browse files
authored
Fix PR builder by adding + centralising Java runtime distribution (#1531)
The [PR builder is failing](https://github.com/hazelcast/hazelcast-nodejs-client/actions/runs/13401905742/job/37434373523#step:2:13) because `setup-java` was upgraded in #1528 but a now-mandatory `distribution` property was not supplied. Changes: - Specify a `distribution` everywhere - Use the same (latest) `setup-java` version everywhere - Centralise `setup-java` configuration to a file (upgrading some places from Java 8) - using the same logic as used in `hazelcast-mono` - I've _not_ touched `nightly_runner_maintenance.yml` as it seems outdated (missing newer maintenance branches) and otherwise would require these changes to be backported
1 parent 5b50e18 commit 6bda5f9

File tree

5 files changed

+28
-18
lines changed

5 files changed

+28
-18
lines changed

.github/java-config.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
JAVA_VERSION=17
2+
JAVA_DISTRIBUTION=temurin

.github/workflows/code_sample_checker.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,19 @@ jobs:
1111
os: [ ubuntu-latest, windows-latest ]
1212

1313
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
- name: Read Java Config
17+
run: cat .github/java-config.env >> $GITHUB_ENV
1418
- name: Setup Java
1519
uses: actions/setup-java@v4
1620
with:
17-
java-version: 17
21+
java-version: ${{ env.JAVA_VERSION }}
22+
distribution: ${{ env.JAVA_DISTRIBUTION }}
1823
- name: Setup Node.js
1924
uses: actions/setup-node@v4
2025
with:
2126
node-version: 10
22-
- name: Checkout code
23-
uses: actions/checkout@v4
2427
- name: Install dependencies and compile client
2528
run: |
2629
npm install

.github/workflows/coverage_runner.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ jobs:
3838
os: [ ubuntu-latest, windows-latest ]
3939

4040
steps:
41-
- name: Setup Java
42-
uses: actions/setup-java@v1
43-
with:
44-
java-version: 17
45-
- name: Setup Node.js
46-
uses: actions/setup-node@v4
47-
with:
48-
node-version: 10
49-
5041
- name: Checkout code for PR
5142
if: github.event_name == 'pull_request_target'
5243
uses: actions/checkout@v4
@@ -63,6 +54,18 @@ jobs:
6354
with:
6455
ref: refs/pull/${{ github.event.inputs.pr_number }}/merge
6556

57+
- name: Read Java Config
58+
run: cat .github/java-config.env >> $GITHUB_ENV
59+
- name: Setup Java
60+
uses: actions/setup-java@v4
61+
with:
62+
java-version: ${{ env.JAVA_VERSION }}
63+
distribution: ${{ env.JAVA_DISTRIBUTION }}
64+
- name: Setup Node.js
65+
uses: actions/setup-node@v4
66+
with:
67+
node-version: 10
68+
6669
- name: Checkout to test artifacts
6770
uses: actions/checkout@v4
6871
with:

.github/workflows/nightly_runner_maintenance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
steps:
1717
- name: Setup Java
18-
uses: actions/setup-java@v2
18+
uses: actions/setup-java@v4
1919
with:
2020
java-version: 8
2121
distribution: temurin

.github/workflows/nightly_runner_master.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,19 @@ jobs:
1313
nodejs_version: [ 10, 18 ]
1414
fail-fast: false
1515
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
- name: Read Java Config
19+
run: cat .github/java-config.env >> $GITHUB_ENV
1620
- name: Setup Java
17-
uses: actions/setup-java@v2
21+
uses: actions/setup-java@v4
1822
with:
19-
java-version: 17
20-
distribution: temurin
23+
java-version: ${{ env.JAVA_VERSION }}
24+
distribution: ${{ env.JAVA_DISTRIBUTION }}
2125
- name: Setup Node.js
2226
uses: actions/setup-node@v4
2327
with:
2428
node-version: ${{ matrix.nodejs_version }}
25-
- name: Checkout code
26-
uses: actions/checkout@v4
2729
- name: Checkout to test artifacts
2830
uses: actions/checkout@v4
2931
with:

0 commit comments

Comments
 (0)