[#80] test: if문 제거 #46
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
name: BuildAndTest | |
on: | |
push: | |
branches: | |
- main | |
- issue/** | |
pull_request: | |
branches: | |
- main | |
- issue/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Install Docker Compose | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y docker-compose | |
- name: Set up Docker Compose | |
run: | | |
docker-compose up -d | |
docker-compose ps | |
- name: Wait for services to be ready | |
run: | | |
until docker-compose exec -T mysql mysqladmin ping -h"127.0.0.1" --silent; do | |
echo "Waiting for MySQL to be ready..." | |
sleep 5 | |
done | |
sleep 10 | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean build -Duser.language=ko -Duser.country=KR | |
- name: Tear down Docker Compose | |
if: always() | |
run: docker-compose down |