-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
41 additions
and
4 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 |
---|---|---|
|
@@ -13,12 +13,13 @@ on: | |
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
build-mysql: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
DATABASE_URL: jdbc:mysql://localhost:3306/sphynx_api | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
|
@@ -50,4 +51,40 @@ jobs: | |
with: | ||
name: jar | ||
path: target/sphynx-0.0.1-SNAPSHOT.jar | ||
build-mariadb: | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
DATABASE_URL: jdbc:mariadb://localhost:3306/sphynx_api | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: maven | ||
|
||
- name: Shutdown Ubuntu MySQL (SUDO) | ||
run: sudo service mysql stop | ||
|
||
- name: Set up MariaDB | ||
uses: getong/[email protected] | ||
with: | ||
host port: 3306 # Optional, default value is 3306. The port of host | ||
container port: 3306 # Optional, default value is 3306. The port of container | ||
character set server: 'utf8' # Optional, default value is 'utf8mb4'. The '--character-set-server' option for mysqld | ||
collation server: 'utf8_general_ci' # Optional, default value is 'utf8mb4_general_ci'. The '--collation-server' option for mysqld | ||
mariadb version: '10.4.10' # Optional, default value is "latest". The version of the MySQL | ||
mysql database: 'sphynx_api' # Optional, default value is "test". The specified database which will be create | ||
mysql root password: 'root' # Required if "mysql user" is empty, default is empty. The root superuser password | ||
|
||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml | ||
|
||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: jar | ||
path: target/sphynx-0.0.1-SNAPSHOT.jar | ||
|