Skip to content

Commit 7f771e7

Browse files
committed
splitting up github workflow to test both mysql 5.7 and mysql 8
1 parent 123676e commit 7f771e7

4 files changed

Lines changed: 64 additions & 3 deletions

File tree

.github/workflows/gradle-build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Java CI
2+
on:
3+
push:
4+
branches: [ master, eugene/* ]
5+
pull_request:
6+
branches: [ master ]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Init submodules
13+
run: ./git-init-submodules.sh
14+
- name: Set up JDK 1.8
15+
uses: actions/setup-java@v1
16+
with:
17+
java-version: 1.8
18+
- name: Setup gradle binaries
19+
run: ./gradlew
20+
- name: Pull dependencies libs, and perform initial compile
21+
run: ./gradlew src
22+
- name: Run unit tests
23+
run: ./gradlew test
24+
- name: Run the build
25+
run: ./gradlew build

.github/workflows/mysql-5-7.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Java CI
2+
on:
3+
push:
4+
branches: [ master, eugene/* ]
5+
pull_request:
6+
branches: [ master ]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
mysql:
13+
image: mysql:5.7
14+
env:
15+
MYSQL_DATABASE: JAVACOMMONS
16+
MYSQL_USER: JAVACOMMONS
17+
MYSQL_PASSWORD: JAVACOMMONS
18+
MYSQL_ROOT_PASSWORD: ROOTPASSWD
19+
ports:
20+
- 3306:3306
21+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
22+
23+
steps:
24+
- uses: actions/checkout@v1
25+
- name: Init submodules
26+
run: ./git-init-submodules.sh
27+
- name: Set up JDK 1.8
28+
uses: actions/setup-java@v1
29+
with:
30+
java-version: 1.8
31+
- name: Setup gradle binaries
32+
run: ./gradlew
33+
- name: Pull dependencies libs, and perform initial compile
34+
run: ./gradlew src
35+
- name: Run unit tests
36+
run: ./gradlew test -Ptest_mysql
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,3 @@ jobs:
3434
run: ./gradlew src
3535
- name: Run unit tests
3636
run: ./gradlew test -Ptest_mysql
37-
- name: Build with Gradle
38-
run: ./gradlew build

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@ test/tmp
3434
# Include back .gitignore
3535
#
3636
!.gitignore
37-
!.travis.yml
37+
!.travis.yml
38+
!.github/
39+
!.github/workflows/*

0 commit comments

Comments
 (0)