fix actions #5
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
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 |