-
Notifications
You must be signed in to change notification settings - Fork 92
103 lines (98 loc) · 4.2 KB
/
tracking-orm-6.2.build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Run the build using the latest ORM 5.x snapshots
# so that we can spot integration issues early
name: Latest ORM 6.2.x
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- 2.0
pull_request:
branches:
- 2.0
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