Skip to content

Commit

Permalink
Remove standalone DMN steps in DB runs + use check profile for DB runs
Browse files Browse the repository at this point in the history
The DMN DB tests are part of the regular tests, which means that there is no need to run it twice.
The check profile is going to include the Spring Boot tests
  • Loading branch information
filiphr committed Jul 2, 2024
1 parent 9c41c3e commit 4482e36
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 276 deletions.
51 changes: 4 additions & 47 deletions .github/workflows/db2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,55 +51,12 @@ jobs:
run: >-
./mvnw clean install
${MAVEN_ARGS}
-PcleanDb,db2
-PcleanDb,db2,check
-Djdbc.url=jdbc:db2://localhost:${{ job.services.db2.ports[50000] }}/flowable
-Djdbc.username=db2inst1
-Djdbc.password=flowable
-Djdbc.driver=com.ibm.db2.jcc.DB2Driver
-Dspring.datasource.url=jdbc:db2://localhost:${{ job.services.db2.ports[50000] }}/flowable
-Dspring.datasource.username=db2inst1
-Dspring.datasource.password=flowable
-Dmaven.test.redirectTestOutputToFile=false
test_db2_dmn:
name: DB2 ${{ matrix.db2 }} DMN
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
db2: ["11.5.0.0a"]
services:
db2:
image: ibmcom/db2:${{ matrix.db2 }}
env:
DB2INST1_PASSWORD: flowable
DBNAME: flowable
LICENSE: accept
ARCHIVE_LOGS: false
AUTOCONFIG: false
ports:
- 50000:50000
# needed because the db2 container does not provide a health check
options: >-
--privileged=true
--health-cmd="su - db2inst1 -c \"~/sqllib/bin/db2 connect to flowable && ~/sqllib/bin/db2 connect reset\""
--health-interval 30s
--health-timeout 40s
--health-retries 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Test
# use db2 for the host here because we have specified a container for the job.
# If we were running the job on the VM this would be localhost
# '>-' is a special YAML syntax and means that new lines would be replaced with spaces
# and new lines from the end would be removed
run: >-
./mvnw clean install
${MAVEN_ARGS}
-Pdmn,db2
-Djdbc.url=jdbc:db2://localhost:${{ job.services.db2.ports[50000] }}/flowable
-Djdbc.username=db2inst1
-Djdbc.password=flowable
-Djdbc.driver=com.ibm.db2.jcc.DB2Driver
-Dmaven.test.redirectTestOutputToFile=false
-pl org.flowable:flowable-dmn-engine -am
46 changes: 4 additions & 42 deletions .github/workflows/mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,50 +48,12 @@ jobs:
run: >-
./mvnw clean install
${MAVEN_ARGS}
-PcleanDb,mariadb
-PcleanDb,mariadb,check
-Djdbc.url=jdbc:mariadb://localhost:${{ job.services.mariadb.ports[3306] }}/flowable?characterEncoding=UTF-8
-Djdbc.username=flowable
-Djdbc.password=flowable
-Djdbc.driver=org.mariadb.jdbc.Driver
-Dspring.datasource.url=jdbc:mariadb://localhost:${{ job.services.mariadb.ports[3306] }}/flowable?characterEncoding=UTF-8
-Dspring.datasource.username=flowable
-Dspring.datasource.password=flowable
-Dmaven.test.redirectTestOutputToFile=false
test_mariadb_dmn:
name: MariadDB ${{ matrix.mariadb }} DMN
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mariadb: [10.6]
services:
mariadb:
image: mariadb:${{ matrix.mariadb }}
env:
MARIADB_DATABASE: flowable
MARIADB_USER: flowable
MARIADB_PASSWORD: flowable
MARIADB_ROOT_PASSWORD: flowable
ports:
- 3306/tcp
# needed because the mariadb container does not provide a health check
options: --health-cmd="mariadb-admin -uflowable -pflowable status" --health-interval 10s --health-timeout 5s --health-retries 5 --tmpfs /var/lib/mariadb:rw
steps:
- name: "Set MariaDB collation"
run: docker exec ${{ job.services.mariadb.id }} sh -c 'mysql --user=flowable --password=flowable --database=flowable --execute="alter database flowable character set utf8mb4 collate utf8mb4_bin"'
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Test
# use mariadb for the host here because we have specified a container for the job.
# '>-' is a special YAML syntax and means that new lines would be replaced with spaces
# and new lines from the end would be removed
run: >-
./mvnw clean install
${MAVEN_ARGS}
-Pdmn,mariadb
-Djdbc.url=jdbc:mariadb://localhost:${{ job.services.mariadb.ports[3306] }}/flowable?characterEncoding=UTF-8
-Djdbc.username=flowable
-Djdbc.password=flowable
-Djdbc.driver=org.mariadb.jdbc.Driver
-Dmaven.test.redirectTestOutputToFile=false
-pl org.flowable:flowable-dmn-engine -am
46 changes: 4 additions & 42 deletions .github/workflows/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,50 +48,12 @@ jobs:
run: >-
./mvnw clean install
${MAVEN_ARGS}
-PcleanDb,mysql
-PcleanDb,mysql,check
-Djdbc.url=jdbc:mysql://localhost:${{ job.services.mysql.ports[3306] }}/flowable?characterEncoding=UTF-8
-Djdbc.username=flowable
-Djdbc.password=flowable
-Djdbc.driver=com.mysql.cj.jdbc.Driver
-Dspring.datasource.url=jdbc:mysql://localhost:${{ job.services.mysql.ports[3306] }}/flowable?characterEncoding=UTF-8
-Dspring.datasource.username=flowable
-Dspring.datasource.password=flowable
-Dmaven.test.redirectTestOutputToFile=false
test_mysql_dmn:
name: MySQL ${{ matrix.mysql }} DMN
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mysql: [5.7, 8.0]
services:
mysql:
image: mysql:${{ matrix.mysql }}
env:
MYSQL_DATABASE: flowable
MYSQL_USER: flowable
MYSQL_PASSWORD: flowable
MYSQL_ROOT_PASSWORD: flowable
ports:
- 3306/tcp
# needed because the mysql container does not provide a health check
options: --health-cmd="mysqladmin -uflowable -pflowable status" --health-interval 10s --health-timeout 5s --health-retries 5 --tmpfs /var/lib/mysql:rw
steps:
- name: "Set MySQL collation"
run: docker exec ${{ job.services.mysql.id }} sh -c 'mysql --user=flowable --password=flowable --database=flowable --execute="alter database flowable character set utf8mb4 collate utf8mb4_bin"'
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Test
# use mysql for the host here because we have specified a container for the job.
# '>-' is a special YAML syntax and means that new lines would be replaced with spaces
# and new lines from the end would be removed
run: >-
./mvnw clean install
${MAVEN_ARGS}
-Pdmn,mysql
-Djdbc.url=jdbc:mysql://localhost:${{ job.services.mysql.ports[3306] }}/flowable?characterEncoding=UTF-8
-Djdbc.username=flowable
-Djdbc.password=flowable
-Djdbc.driver=com.mysql.cj.jdbc.Driver
-Dmaven.test.redirectTestOutputToFile=false
-pl org.flowable:flowable-dmn-engine -am
59 changes: 4 additions & 55 deletions .github/workflows/oracle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,65 +57,14 @@ jobs:
run: >-
./mvnw clean install
${MAVEN_ARGS}
-PcleanDb,oracle
-PcleanDb,oracle,check
-Djdbc.url=jdbc:oracle:thin:@localhost:${{ job.services.oracle.ports[1521] }}/${{ matrix.serviceName }}
-Djdbc.username=flowable
-Djdbc.password=flowable
-Djdbc.driver=oracle.jdbc.driver.OracleDriver
-Dspring.datasource.url=jdbc:oracle:thin:@localhost:${{ job.services.oracle.ports[1521] }}/${{ matrix.serviceName }}
-Dspring.datasource.username=flowable
-Dspring.datasource.password=flowable
-Doracle.jdbc.version=${{ matrix.driverVersion }}
-Doracle.jdbc.artifact=${{ matrix.driverArtifact }}
-Dmaven.test.redirectTestOutputToFile=false
test_oracle_dmn:
name: Oracle ${{ matrix.oracle }} DMN
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
oracle: [ "18-slim", "21-slim" ]
include:
- oracle: 18-slim
driverVersion: 18.3.0.0
driverArtifact: ojdbc8
serviceName: XEPDB1
- oracle: 21-slim
driverVersion: 21.6.0.0.1
driverArtifact: ojdbc8
serviceName: XEPDB1
services:
oracle:
image: gvenzl/oracle-xe:${{ matrix.oracle }}
env:
ORACLE_PASSWORD: flowable
APP_USER: flowable
APP_USER_PASSWORD: flowable
ports:
- 1521/tcp
options: >-
--shm-size=2g
--health-cmd healthcheck.sh
--health-interval 20s
--health-timeout 10s
--health-retries 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Test
# use oracle for the host here because we have specified a container for the job.
# If we were running the job on the VM this would be localhost
# '>-' is a special YAML syntax and means that new lines would be replaced with spaces
# and new lines from the end would be removed
run: >-
./mvnw clean install
${MAVEN_ARGS}
-Pdmn,oracle
-Djdbc.url=jdbc:oracle:thin:@localhost:${{ job.services.oracle.ports[1521] }}/${{ matrix.serviceName }}
-Djdbc.username=flowable
-Djdbc.password=flowable
-Djdbc.driver=oracle.jdbc.driver.OracleDriver
-Doracle.jdbc.version=${{ matrix.driverVersion }}
-Doracle.jdbc.artifact=${{ matrix.driverArtifact }}
-Dmaven.test.redirectTestOutputToFile=false
-pl org.flowable:flowable-dmn-engine -am
43 changes: 4 additions & 39 deletions .github/workflows/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,47 +44,12 @@ jobs:
run: >-
./mvnw clean install
${MAVEN_ARGS}
-PcleanDb,postgresql
-PcleanDb,postgresql,check
-Djdbc.url=jdbc:postgresql://localhost:${{ job.services.postgres.ports[5432] }}/flowable
-Djdbc.username=flowable
-Djdbc.password=flowable
-Djdbc.driver=org.postgresql.Driver
-Dspring.datasource.url=jdbc:postgresql://localhost:${{ job.services.postgres.ports[5432] }}/flowable
-Dspring.datasource.username=flowable
-Dspring.datasource.password=flowable
-Dmaven.test.redirectTestOutputToFile=false
test_postgres_dmn:
name: Postgres ${{ matrix.postgres }} DMN
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
postgres: [11, 12, 13, 14, 15, 16]
services:
postgres:
image: postgres:${{ matrix.postgres }}
env:
POSTGRES_PASSWORD: flowable
POSTGRES_USER: flowable
ports:
- 5432:5432
# needed because the postgres container does not provide a health check
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 --tmpfs /var/lib/postgresql/data:rw
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Test
# use postgres for the host here because we have specified a container for the job.
# If we were running the job on the VM this would be localhost
# '>-' is a special YAML syntax and means that new lines would be replaced with spaces
# and new lines from the end would be removed
run: >-
./mvnw clean install
${MAVEN_ARGS}
-Pdmn,postgresql
-Djdbc.url=jdbc:postgresql://localhost:${{ job.services.postgres.ports[5432] }}/flowable
-Djdbc.username=flowable
-Djdbc.password=flowable
-Djdbc.driver=org.postgresql.Driver
-Dmaven.test.redirectTestOutputToFile=false
-pl org.flowable:flowable-dmn-engine -am
55 changes: 4 additions & 51 deletions .github/workflows/sql-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,59 +56,12 @@ jobs:
run: >-
./mvnw clean install
${MAVEN_ARGS}
-PcleanDb,mssql
-PcleanDb,mssql,check
-Djdbc.url="jdbc:sqlserver://localhost:${{ job.services.mssql.ports[1433] }};database=flowable;encrypt=false"
-Djdbc.username=flowable
-Djdbc.password=flowable
-Djdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
-Dspring.datasource.url="jdbc:sqlserver://localhost:${{ job.services.mssql.ports[1433] }};database=flowable;encrypt=false"
-Dspring.datasource.username=flowable
-Dspring.datasource.password=flowable
-Dmaven.test.redirectTestOutputToFile=false
test_mssql_dmn:
name: DMN SQL Server ${{ matrix.mssql }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mssql: [2017-latest-ubuntu, 2019-latest]
services:
mssql:
image: mcr.microsoft.com/mssql/server:${{ matrix.mssql }}
env:
SA_PASSWORD: flowableStr0ngPassword
ACCEPT_EULA: Y
ports:
- 1433/tcp
# needed because the mssql container does not provide a health check
options: >-
--health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P flowableStr0ngPassword -l 30 -Q \"SELECT 1\" || exit 1"
--health-start-period 10s
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v4
- name: Prepare Database
run: ./.github/actions/scripts/prepare-mssql.sh
env:
# use localhost for the host here because we have specified a vm for the job.
# If we were running the job on a container this would be mssql
MSSQL_HOST: localhost
MSSQL_PORT: ${{ job.services.mssql.ports[1433] }} # get randomly assigned published port
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Test
# use localhost for the host here because we have specified a vm for the job.
# If we were running the job on a container this would be mssql
# '>-' is a special YAML syntax and means that new lines would be replaced with spaces
# and new lines from the end would be removed
run: >-
./mvnw clean install
${MAVEN_ARGS}
-Pdmn,mssql
-Djdbc.url="jdbc:sqlserver://localhost:${{ job.services.mssql.ports[1433] }};database=flowable;encrypt=false"
-Djdbc.username=flowable
-Djdbc.password=flowable
-Djdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
-Dmaven.test.redirectTestOutputToFile=false
-pl org.flowable:flowable-dmn-engine -am

0 comments on commit 4482e36

Please sign in to comment.