Skip to content

Commit 6cd4b90

Browse files
committed
Run build and tests on latest stable java version in nightly build
1 parent b0750a8 commit 6cd4b90

File tree

2 files changed

+91
-2
lines changed

2 files changed

+91
-2
lines changed

.github/actions/common/action.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Oracle and/or its affiliates.
2+
# Copyright (c) 2024, 2025 Oracle and/or its affiliates.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -51,6 +51,9 @@ inputs:
5151
free-space:
5252
description: Whether to aggressively free disk space on the runner
5353
default: 'false'
54+
setup-latest-java:
55+
description: Whether to setup latest stable java version
56+
default: 'false'
5457
runs:
5558
using: "composite"
5659
steps:
@@ -87,10 +90,18 @@ runs:
8790
check-for-updates: 'false'
8891
set-java-home: 'false'
8992
- name: Set up JDK
93+
if: ${{ inputs.setup-latest-java == 'false' }}
9094
uses: actions/[email protected]
9195
with:
9296
distribution: ${{ env.JAVA_DISTRO }}
9397
java-version: ${{ env.JAVA_VERSION }}
98+
- name: Set up JDK ea-stable
99+
if: ${{ inputs.setup-latest-java == 'true' }}
100+
uses: oracle-actions/setup-java@v1
101+
with:
102+
website: jdk.java.net
103+
release: ea
104+
version: stable
94105
- name: Cache local Maven repository (read-write)
95106
if: ${{ inputs.maven-cache == 'read-write' }}
96107
uses: actions/[email protected]
@@ -159,7 +170,7 @@ runs:
159170
**/target/failsafe-reports/**
160171
**/target/it/**/*.log
161172
- name: Archive artifacts
162-
if: ${{ inputs.artifact-name != '' && inputs.artifact-path != '' && always() }}
173+
if: ${{ inputs.artifact-name != '' && inputs.artifact-path != '' && always() }}
163174
uses: actions/upload-artifact@v4
164175
with:
165176
if-no-files-found: 'ignore'

.github/workflows/nightly.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#
2+
# Copyright (c) 2025 Oracle and/or its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: "Nightly Build"
17+
18+
on:
19+
schedule:
20+
- cron: '0 10 * * 0-6'
21+
22+
env:
23+
MVN_ARGS: |
24+
-B -fae -e
25+
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60
26+
-Dmaven.wagon.http.retryHandler.count=3
27+
-Djdk.toolchain.version=${JAVA_VERSION}
28+
-Dcache.enabled=true
29+
30+
jobs:
31+
build:
32+
timeout-minutes: 15
33+
runs-on: ubuntu-22.04
34+
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
ref: ${{ inputs.ref }}
38+
- uses: ./.github/actions/common
39+
with:
40+
build-cache: read-write
41+
maven-cache: read-write
42+
setup-latest-java: true
43+
run: |
44+
mvn ${MVN_ARGS} --version
45+
mvn ${MVN_ARGS} build-cache:go-offline
46+
mvn ${MVN_ARGS} -T8 \
47+
-Dorg.slf4j.simpleLogger.showThreadName=true \
48+
-DskipTests \
49+
-Ptests \
50+
install
51+
tests:
52+
needs: build
53+
timeout-minutes: 30
54+
strategy:
55+
matrix:
56+
os: [ ubuntu-22.04, windows-2022 ]
57+
moduleSet: [ core, it, jpa, jpa-oracle, dbclient, dbclient-oracle, others ]
58+
include:
59+
- { os: ubuntu-22.04, platform: linux }
60+
- { os: windows-2022, platform: windows }
61+
runs-on: ${{ matrix.os }}
62+
name: tests/${{ matrix.moduleSet }}-${{matrix.platform}}-latest-java
63+
steps:
64+
- uses: actions/checkout@v4
65+
with:
66+
ref: ${{ inputs.ref }}
67+
- uses: ./.github/actions/common
68+
with:
69+
build-cache: read-only
70+
setup-latest-java: true
71+
test-artifact-name: tests-${{ matrix.moduleSet }}-${{ matrix.platform }}-latest-java
72+
run: |
73+
mvn --version
74+
mvn ${MVN_ARGS} \
75+
-DreactorRule=tests \
76+
-DmoduleSet=${{ matrix.moduleSet }} \
77+
-Dsurefire.reportNameSuffix=${{ matrix.platform }} \
78+
verify

0 commit comments

Comments
 (0)