This repository has been archived by the owner on Apr 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.53 KB
/
build.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
52
53
54
name: Build and Test
on:
pull_request:
branches: ["main", "dev"]
push:
branches: ["WW-113"]
workflow_dispatch:
jobs:
run-tests:
runs-on: ubuntu-latest
services:
sql-db:
image: wisdomwork/sql:latest
env:
MYSQL_DATABASE: codee
# So you don't have to use root, but you can if you like
MYSQL_USER: admin
# You can use whatever password you like
MYSQL_PASSWORD: Wisdomworks.33
# Password for root access
MYSQL_ROOT_PASSWORD: Wisdomworks.33
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=5
nosql-db:
image: wisdomwork/mongo:latest
env:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: Wisdomworks.33
ports:
- 27017:27017
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
cache: maven
- name: Build with Maven
env:
SPRING_DATASOURCE_URL: jdbc:mysql://localhost:3306/codee
SPRING_DATASOURCE_USERNAME: admin
SPRING_DATASOURCE_PASSWORD: Wisdomworks.33
SPRING_DATA_MONGODB_URI: mongodb://admin:Wisdomworks.33@localhost/?retryWrites=true&w=majority
SPRING_DATA_MONGODB_DATABASE: codee
run: mvn -B package --file pom.xml