Latest ORM 6.4 #4847
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run the build using the latest ORM 5.x snapshots | |
# so that we can spot integration issues early | |
name: Latest ORM 6.x | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
# * is a special character in YAML, so you have to quote this string | |
# Run every hour at minute 25 | |
- cron: '25 * * * *' | |
# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting. | |
concurrency: | |
# Consider that two builds are in the same concurrency group (cannot run concurrently) | |
# if they use the same workflow and are about the same branch ("ref") or pull request. | |
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}" | |
# Cancel previous builds in the same concurrency group even if they are in process | |
# for pull requests or pushes to forks (not the upstream repository). | |
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'hibernate/hibernate-reactive' }} | |
jobs: | |
# The examples test the Hibernate ORM Gradle plugin. We use it for bytecode enhancements. | |
run_examples: | |
name: Run examples in '${{ matrix.example }}' on ${{ matrix.db }} with latest ORM ${{ matrix.orm-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
example: [ 'session-example', 'native-sql-example' ] | |
orm-version: [ '[6.2,6.3)' ] | |
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.33 | |
env: | |
MYSQL_ROOT_PASSWORD: hreact | |
MYSQL_DATABASE: hreact | |
MYSQL_USER: hreact | |
MYSQL_PASSWORD: hreact | |
# Set health checks to wait until mysql 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:15.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: Set up JDK 11 | |
with: | |
java-version: 11 | |
uses: actions/setup-java@v1 | |
- name: Print the effective ORM version used | |
run: ./gradlew :${{ matrix.example }}:dependencyInsight --dependency org.hibernate.orm:hibernate-core -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep | |
- name: Run examples in '${{ matrix.example }}' on ${{ matrix.db }} | |
run: ./gradlew :${{ matrix.example }}:runAllExamplesOn${{ matrix.db }} -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep | |
test_dbs: | |
name: Test with ${{ matrix.db }} and ORM ${{ matrix.orm-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
orm-version: [ '[6.2,6.3)' ] | |
db: [ 'MariaDB', 'MySQL', 'PostgreSQL', 'DB2', 'CockroachDB', 'MSSQLServer', 'Oracle' ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Print the effective ORM version used | |
run: ./gradlew :hibernate-reactive-core:dependencyInsight --dependency org.hibernate.orm:hibernate-core -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep | |
- name: Build and Test with ${{ matrix.db }} | |
run: ./gradlew build -Pdb=${{ matrix.db }} -Pdocker -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep -PshowStandardOutput | |