-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 897 Bytes
/
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
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:latest
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: sampledb
MYSQL_USER: sampleuser
MYSQL_PASSWORD: samplepassword
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
- name: Wait for MySQL to be ready
run: |
until mysqladmin ping -h localhost -u sampleuser -p"samplepassword" --silent; do
echo "Waiting for MySQL to be ready..."
sleep 2
done
- name: Build with Gradle
run: ./gradlew build
- name: Run JaCoCo Test Report
run: ./gradlew jacocoTestReport