Skip to content

Feat: #BBB-153 로깅 시스템 구축 #247

Feat: #BBB-153 로깅 시스템 구축

Feat: #BBB-153 로깅 시스템 구축 #247

Workflow file for this run

name: Java CI with Gradle and MySQL and Elasticsearch
on:
pull_request:
branches:
[ "develop" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: testdb
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.13.4
ports:
- 9200:9200
env:
discovery.type: single-node
xpack.security.enabled: false
xpack.security.http.ssl.enabled: false
xpack.security.http.ssl.verification_mode: certificate
xpack.security.transport.ssl.enabled: false
xpack.security.transport.ssl.verification_mode: certificate
xpack.license.self_generated.type: basic
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Wait for MySQL
run: |
# Wait until MySQL is ready
while ! mysqladmin ping -h "127.0.0.1" --silent; do
echo "Waiting for MySQL..."
sleep 2
done
- name: Initialize database
run: |
mysql -h 127.0.0.1 -u root -proot -e "CREATE DATABASE IF NOT EXISTS test;"
mysql -h 127.0.0.1 -u root -proot -e "CREATE DATABASE IF NOT EXISTS bombombom;"
- name: Wait for Elasticsearch
run: |
sleep 10
curl -X GET http://localhost:9200/
- name: Test And Build with Gradle Wrapper
run: |
ACCESS_TOKEN_EXPIRE=300000000 JWT_SECRET_KEY=abcadsadsaqwdwqdfasdasd3r3214t4tk4ninifnewfokncknwfnopefw MYSQL_DATABASE=bombombom MYSQL_HOST=localhost MYSQL_PASSWORD=root MYSQL_USERNAME=root REFRESH_TOKEN_EXPIRE=7120000 TEST_MYSQL_DATABASE=test PORT=8080 LOG_LEVEL=DEBUG NAVER_CLIENT_ID=${{ secrets.NAVER_CLIENT_ID }} NAVER_CLIENT_SECRET=${{ secrets.NAVER_CLIENT_SECRET }} ELASTICSEARCH_URI=localhost:9200 TEST_ELASTICSEARCH_URI=localhost:9200 FRONT_SERVER_ORIGIN=http://localhost:3000 REDIS_HOST=localhost REDIS_PORT=6379 TEST_REDIS_HOST=localhost TEST_REDIS_PORT=6379 REDIS_SSL_ENABLED=false ./gradlew build