-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from is0xjh25/CI-test
update Ci test
- Loading branch information
Showing
2 changed files
with
33 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,19 @@ | |
|
||
name: Java CI with Maven | ||
|
||
#only test when push to main or pull_request to main | ||
on: | ||
[push] | ||
# push: | ||
# branches: [ main ] | ||
# pull_request: | ||
# branches: [ main ] | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
|
||
#Build't job | ||
jobs: | ||
#Test's job | ||
tests: | ||
name: Unit tests | ||
name: Integration tests | ||
#Run on Ubuntu using the latest version | ||
runs-on: ubuntu-latest | ||
|
||
|
@@ -32,6 +32,30 @@ jobs: | |
distribution: 'adopt' | ||
cache: maven | ||
|
||
- name: Setup MySQL | ||
# You may pin to the exact commit or the version. | ||
# uses: mirromutth/mysql-action@de1fba8b3f90ce8db80f663a7043be3cf3231248 | ||
uses: mirromutth/[email protected] | ||
with: | ||
# The port of host | ||
host port: 3306 | ||
# The port of container | ||
container port: 3306 | ||
# --character-set-server - The character set of MySQL server | ||
character set server: utf8mb4 | ||
# --collation-server - The character collation of MySQL server | ||
collation server: utf8mb4_general_ci | ||
# Version of MySQL to use | ||
mysql version: 8 | ||
# MYSQL_ROOT_PASSWORD - root superuser password | ||
mysql root password: 415623 | ||
# MYSQL_DATABASE - name for the default database that is created | ||
mysql database: testdb | ||
# MYSQL_USER - create the specified user with superuser power for created database | ||
mysql user: root | ||
# MYSQL_PASSWORD - specified superuser password which user is power for created database | ||
mysql password: 415623 | ||
|
||
#Run Tests | ||
- name: Run Tests | ||
run: mvn -B test |
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