Latest Vert.x SQL client 4 #4871
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 Vert.x SQL client 4 | |
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 Vert.x ${{ matrix.orm-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
example: [ 'session-example', 'native-sql-example' ] | |
vertx-version: [ '[4.4,4.5)' ] | |
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 io.vertx:vertx-sql-client -PvertxVersion='${{ matrix.vertx-version }}' -PenableSonatypeOpenSourceSnapshotsRep | |
- name: Run examples in '${{ matrix.example }}' on ${{ matrix.db }} | |
run: ./gradlew :${{ matrix.example }}:runAllExamplesOn${{ matrix.db }} -PvertxVersion='${{ matrix.vertx-version }}' -PenableSonatypeOpenSourceSnapshotsRep | |
test_dbs: | |
name: Test with ${{ matrix.db }} and Vert.x ${{ matrix.vertx-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
vertx-version: [ '[4.4,4.5)' ] | |
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 io.vertx:vertx-sql-client -PvertxVersion='${{ matrix.vertx-version }}' -PenableSonatypeOpenSourceSnapshotsRep | |
- name: Build and Test with ${{ matrix.db }} | |
run: ./gradlew build -Pdb=${{ matrix.db }} -Pdocker -PvertxVersion='${{ matrix.vertx-version }}' -PenableSonatypeOpenSourceSnapshotsRep -PshowStandardOutput | |