1
+ # GitHub actions for branch testing the latest Hibernate ORM 7.0 snapshot
1
2
name : Hibernate Reactive CI
2
3
3
4
on :
22
23
runs-on : ubuntu-latest
23
24
strategy :
24
25
matrix :
26
+ orm-version : [ '7.0.0-SNAPSHOT' ]
25
27
example : [ 'session-example', 'native-sql-example' ]
26
28
db : [ 'MySQL', 'PostgreSQL' ]
27
29
exclude :
65
67
- uses : actions/checkout@v2
66
68
- name : Get year/month for cache key
67
69
id : get-date
68
- run : |
69
- echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
70
+ run : echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
70
71
shell : bash
71
72
- name : Cache Gradle downloads
72
73
uses : actions/cache@v2
97
98
runs-on : ubuntu-latest
98
99
strategy :
99
100
matrix :
101
+ orm-version : [ '7.0.0-SNAPSHOT' ]
100
102
db : [ 'MariaDB', 'MySQL', 'PostgreSQL', 'MSSQLServer', 'CockroachDB', 'Db2', 'Oracle' ]
101
103
steps :
102
104
- uses : actions/checkout@v2
@@ -135,6 +137,7 @@ jobs:
135
137
strategy :
136
138
fail-fast : false
137
139
matrix :
140
+ orm-version : [ '7.0.0-SNAPSHOT' ]
138
141
# To list the available "feature versions" on adoptium.net (ignore "tip_version", it's not relevant):
139
142
# https://api.adoptium.net/v3/info/available_releases
140
143
# To list the available releases for a given "feature version" on adoptium.net (example for 16):
@@ -196,13 +199,11 @@ jobs:
196
199
id : mainjdk-exportpath
197
200
run : echo "::set-output name=path::${JAVA_HOME}"
198
201
- name : Display exact version of JDK ${{ matrix.java.name }}
199
- run : |
200
- ${{ steps.testjdk-exportpath.outputs.path }}/bin/java -version
202
+ run : ${{ steps.testjdk-exportpath.outputs.path }}/bin/java -version
203
+ - name : Print the effective ORM version used
204
+ run : ./gradlew :hibernate-reactive-core:dependencyInsight --dependency org.hibernate.orm:hibernate-core -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep
201
205
- name : Build and Test with Java ${{ matrix.java.name }}
202
- run : |
203
- ./gradlew build -PshowStandardOutput -Pdocker -Ptest.jdk.version=${{ matrix.java.java_version_numeric }} \
204
- -Porg.gradle.java.installations.paths=${{ steps.mainjdk-exportpath.outputs.path }},${{ steps.testjdk-exportpath.outputs.path }} \
205
- ${{ matrix.java.jvm_args && '-Ptest.jdk.launcher.args=' }}${{ matrix.java.jvm_args }}
206
+ run : ./gradlew build -PshowStandardOutput -Pdocker -Ptest.jdk.version=${{ matrix.java.java_version_numeric }} -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep -Porg.gradle.java.installations.paths=${{ steps.mainjdk-exportpath.outputs.path }},${{ steps.testjdk-exportpath.outputs.path }} ${{ matrix.java.jvm_args && '-Ptest.jdk.launcher.args=' }}${{ matrix.java.jvm_args }}
206
207
- name : Upload reports (if build failed)
207
208
uses : actions/upload-artifact@v2
208
209
if : failure()
@@ -215,22 +216,21 @@ jobs:
215
216
if : github.event_name == 'push' && startsWith( github.ref, 'refs/heads/' )
216
217
runs-on : ubuntu-latest
217
218
steps :
218
- - uses : actions/checkout@v2
219
- - name : Set up JDK 11
220
- uses : actions/setup-java@v2.2.0
221
- with :
222
- distribution : ' temurin'
223
- java-version : 17
224
- - name : Create artifacts
225
- run : ./gradlew assemble
226
- - name : Detect the version of Hibernate Reactive
227
- id : detect-version
228
- run : |
229
- sed -E 's/^projectVersion( *= *| +)([^ ]+)/::set-output name=version::\2/g' gradle/version.properties
230
- - name : Publish snapshot to JBoss Nexus
231
- env :
232
- ORG_GRADLE_PROJECT_jbossNexusUser : ${{ secrets.JBOSS_NEXUS_USER }}
233
- ORG_GRADLE_PROJECT_jbossNexusPassword : ${{ secrets.JBOSS_NEXUS_PASSWORD }}
234
- if : endsWith( steps.detect-version.outputs.version, '-SNAPSHOT' ) && env.ORG_GRADLE_PROJECT_jbossNexusUser
235
- run : ./gradlew publishToJBossNexus closeAndReleaseJBossNexusStagingRepository
219
+ - uses : actions/checkout@v2
220
+ - name : Set up JDK 17
221
+ uses : actions/setup-java@v2.2.0
222
+ with :
223
+ distribution : ' temurin'
224
+ java-version : 17
225
+ - name : Create artifacts
226
+ run : ./gradlew assemble
227
+ - name : Detect the version of Hibernate Reactive
228
+ id : detect-version
229
+ run : |
230
+ sed -E 's/^projectVersion( *= *| +)([^ ]+)/::set-output name=version::\2/g' gradle/version.properties
231
+ - name : Publish snapshots to OSSRH, close repository and release
232
+ env :
233
+ ORG_GRADLE_PROJECT_sonatypeOssrhUser : ${{ secrets.SONATYPE_OSSRH_USER }}
234
+ ORG_GRADLE_PROJECT_sonatypeOssrhPassword : ${{ secrets.SONATYPE_OSSRH_PASSWORD }}
235
+ run : ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
236
236
0 commit comments