-
Notifications
You must be signed in to change notification settings - Fork 15
51 lines (49 loc) · 1.78 KB
/
workflow-2.x.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
name: Build and Test With Maven [2.x]
on:
workflow_dispatch:
inputs:
databaseType:
type: choice
required: true
options:
- MySQL
- Mariadb
- MSSQL
- PostgreSQL
- Oracle
- All
- None
jobs:
maven-build:
concurrency:
group: reactive-mybais-support
cancel-in-progress: false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: Build With Maven
run: mvn clean compile package -DskipTests --file pom.xml
- name: Setup Testcontainers Cloud Client
if: ${{ github.event.inputs.databaseType != 'None' }}
uses: atomicjar/testcontainers-cloud-setup-action@v1
with:
token: ${{ secrets.TC_CLOUD_TOKEN }}
- name: Run Tests With MySQLContainer
if: ${{ contains(fromJSON('["All", "MySQL"]'), github.event.inputs.databaseType) }}
run: mvn -B -DargLine="-DdatabaseType=MySQLContainer" test
- name: Run Tests With MariaDBContainer
if: ${{ contains(fromJSON('["All", "Mariadb"]'), github.event.inputs.databaseType) }}
run: mvn -B -DargLine="-DdatabaseType=MariaDBContainer" test
- name: Run Tests With PostgreSQLContainer
if: ${{ contains(fromJSON('["All", "PostgreSQL"]'), github.event.inputs.databaseType) }}
run: mvn -B -DargLine="-DdatabaseType=PostgreSQLContainer" test
- name: Run Tests With MSSQLServerContainer
if: ${{ contains(fromJSON('["All", "MSSQL"]'), github.event.inputs.databaseType) }}
run: mvn -B -DargLine="-DdatabaseType=MSSQLServerContainer" test