Skip to content

Gradle 빌드 버그 수정 #16

Gradle 빌드 버그 수정

Gradle 빌드 버그 수정 #16

Workflow file for this run

name: BE CI/CD with MySQL
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
jobs:
backend-CI:
runs-on: ubuntu-latest
services:
db:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: ${{ secrets.DB_PASSWORD }}
MYSQL_DATABASE: aimo
MYSQL_USER: ${{ secrets.DB_USERNAME }}
MYSQL_PASSWORD: ${{ secrets.DB_PASSWORD }}
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping -h localhost" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
# 소스 코드 체크아웃
- uses: actions/checkout@v4
# JDK 17 설정
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
# Gradle 실행 권한 설정
- name: Grant execute permission to gradlew
run: chmod +x gradlew
working-directory: ${{ secrets.WORKING_DIRECTORY }}
# Gradle 빌드 및 테스트 실행
- name: Build and Test with Gradle
run: ./gradlew build -Dspring.profiles.active=ci
working-directory: ${{ secrets.WORKING_DIRECTORY }}
env:
SPRING_DATASOURCE_URL: ${{ secrets.DB_URL }}
SPRING_DATASOURCE_USERNAME: ${{ secrets.DB_USERNAME }}
SPRING_DATASOURCE_PASSWORD: ${{ secrets.DB_PASSWORD }}