Skip to content

Commit

Permalink
Update maven.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Snootic authored Apr 12, 2024
1 parent fd60e28 commit 8392a2b
Showing 1 changed file with 41 additions and 4 deletions.
45 changes: 41 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 8392a2b

Please sign in to comment.