Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
190 changes: 7 additions & 183 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,92 +3,19 @@ name: Hibernate Reactive CI
on:
push:
branches:
- main
- wip/mssql
tags: '*'
pull_request:
branches: main
branches: wip/mssql

jobs:
run_examples:
name: Run examples in '${{ matrix.example }}' on ${{ matrix.db }}
runs-on: ubuntu-latest
strategy:
matrix:
example: [ 'session-example', 'native-sql-example' ]
db: [ 'MySQL', 'PostgreSQL' ]
exclude:
# 'native-sql-example' doesn't run on MySQL because it has native queries
- example: 'native-sql-example'
db: 'MySQL'
services:
# Label used to access the service container
mysql:
# Docker Hub image
image: mysql:8.0.24
env:
MYSQL_ROOT_PASSWORD: hreact
MYSQL_DATABASE: hreact
MYSQL_USER: hreact
MYSQL_PASSWORD: hreact
# Set health checks to wait until postgres has started
options: >-
--health-cmd="mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 3306:3306
postgres:
# Docker Hub image
image: postgres:13.2
env:
POSTGRES_DB: hreact
POSTGRES_USER: hreact
POSTGRES_PASSWORD: hreact
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Get year/month for cache key
id: get-date
run: |
echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
shell: bash
- name: Cache Gradle downloads
uses: actions/cache@v2
id: cache-gradle
with:
path: |
.gradle/caches
.gradle/jdks
.gradle/wrapper
# refresh cache every month to avoid unlimited growth
key: gradle-examples-${{ matrix.db }}-${{ steps.get-date.outputs.yearmonth }}
- name: Set up JDK 1.8
with:
java-version: 1.8
uses: actions/setup-java@v1
- name: Run examples in '${{ matrix.example }}' on ${{ matrix.db }}
run: ./gradlew :${{ matrix.example }}:runAllExamplesOn${{ matrix.db }}
- name: Upload reports (if build failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: reports-examples-${{ matrix.db }}
path: './**/build/reports/'

test_dbs:
name: Test with ${{ matrix.db }}
runs-on: ubuntu-latest
strategy:
matrix:
db: [ 'MariaDB', 'MySQL', 'PostgreSQL', 'DB2', 'CockroachDB' ]
db: [ 'MSSQLServer' ]
vertx-version: [ '[4.1,4.2)' ]
steps:
- uses: actions/checkout@v2
- name: Get year/month for cache key
Expand All @@ -110,116 +37,13 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Print the effective Vert.x version used
run: ./gradlew :hibernate-reactive-core:dependencyInsight --dependency io.vertx -PvertxVersion='${{ matrix.vertx-version }}' -PenableSonatypeOpenSourceSnapshotsRep
- name: Build and Test with ${{ matrix.db }}
run: ./gradlew build -PshowStandardOutput -Pdocker -Pdb=${{ matrix.db }}
run: ./gradlew build -PshowStandardOutput -Pdocker -Pdb=${{ matrix.db }} -PvertxVersion='${{ matrix.vertx-version }}' -PenableSonatypeOpenSourceSnapshotsRep
- name: Upload reports (if build failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: reports-db-${{ matrix.db }}
path: './**/build/reports/'

test_jdks:
name: Test with Java ${{ matrix.java.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java:
- { name: "8", java-version: 8, release_type: "ga" }
- { name: "11", java-version: 11, release_type: "ga" }
- { name: "15", java-version: 15, release_type: "ga" }
- { name: "16", java-version: 16, release_type: "ga" }
- { name: "17-ea", java-version: 17, release_type: "ea" }
steps:
- uses: actions/checkout@v2
- name: Get year/month for cache key
id: get-date
run: |
echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
shell: bash
- name: Cache Gradle downloads
uses: actions/cache@v2
id: cache-gradle
with:
path: |
.gradle/caches
.gradle/jdks
.gradle/wrapper
# refresh cache every month to avoid unlimited growth
key: gradle-java${{ matrix.java }}-${{ steps.get-date.outputs.yearmonth }}
- name: Set up JDK ${{ matrix.java.name }}
uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52
id: install-testjdk
with:
java-version: ${{ matrix.java.java-version }}
release_type: ${{ matrix.java.release_type }}
# Always use JDK 8 to build the main code: that's what we use for releases.
- name: Set up JDK 8
uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52
id: install-mainjdk
with:
java-version: 8
- name: Build and Test with Java ${{ matrix.java.name }}
run: |
./gradlew build -PshowStandardOutput -Pdocker -Ptest.jdk.version=${{ matrix.java.java-version }} \
-Porg.gradle.java.installations.paths=${{ steps.install-mainjdk.outputs.path }},${{ steps.install-testjdk.outputs.path }}
- name: Upload reports (if build failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: reports-java${{ matrix.java.name }}
path: './**/build/reports/'

snapshot:
name: Create snapshot
if: github.event_name == 'push' && startsWith( github.ref, 'refs/heads/' )
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Create artifacts
run: ./gradlew assemble
- name: Detect the version of Hibernate Reactive
id: detect-version
run: |
sed -E 's/^projectVersion( *= *| +)([^ ]+)/::set-output name=version::\2/g' gradle/version.properties
- name: Publish snapshot to JBoss Nexus
env:
ORG_GRADLE_PROJECT_jbossNexusUser: ${{ secrets.JBOSS_NEXUS_USER }}
ORG_GRADLE_PROJECT_jbossNexusPassword: ${{ secrets.JBOSS_NEXUS_PASSWORD }}
if: endsWith( steps.detect-version.outputs.version, '-SNAPSHOT' ) && env.ORG_GRADLE_PROJECT_jbossNexusUser
run: ./gradlew publishToJBossNexus closeAndReleaseJBossNexusStagingRepository

release:
name: Release
if: github.event_name == 'push' && startsWith( github.ref, 'refs/tags/' )
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Create artifacts
run: ./gradlew assemble
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.HIBERNATE_ORG_SSH_KEY }}
name: id_rsa_hibernate.org
known_hosts: ${{ secrets.HIBERNATE_ORG_SSH_KNOWN_HOSTS }}
config: |
Host github.com
User hibernate
IdentityFile ~/.ssh/id_rsa_hibernate.org
- name: Publish documentation on Hibernate.org
run: ./gradlew publishDocumentation -PdocPublishBranch=production
- name: Publish artifacts to OSSRH, close repository and release
env:
ORG_GRADLE_PROJECT_sonatypeOssrhUser: ${{ secrets.SONATYPE_OSSRH_USER }}
ORG_GRADLE_PROJECT_sonatypeOssrhPassword: ${{ secrets.SONATYPE_OSSRH_PASSWORD }}
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
92 changes: 0 additions & 92 deletions .github/workflows/tracking-orm-5.build.yml

This file was deleted.

Loading