Skip to content

chore: spring properties 설정 #1

chore: spring properties 설정

chore: spring properties 설정 #1

Workflow file for this run

name: Spring Boot Gradle Test Workflow
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Configure docker-compose.yml
uses: microsoft/variable-substitution@v1
with:
files: ./docker-compose.yml
env:
services.mysql.environment.MYSQL_DATABASE: ${{secrets.TEST_DATABASE}}
services.mysql.environment.MYSQL_ROOT_PASSWORD: ${{secrets.TEST_DB_PASSWORD}}
services.minio.environment.MINIO_ROOT_USER: ${{secrets.STORAGE_USER}}
services.minio.environment.MINIO_ROOT_PASSWORD: ${{secrets.STORAGE_PASSWORD}}
# Build and start container
- name: Build and Start Container
run: docker-compose up -d
# java 설치
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'liberica'
# 환경 변수 적용
- name: Configure application.yaml under test directory
uses: microsoft/variable-substitution@v1
with:
files: ./src/test/resources/application.yaml
env:
spring.datasource.username: ${{secrets.MYSQL_USERNAME}}
spring.datasource.password: ${{secrets.MYSQL_PASSWORD}}
spring.datasource.url: ${{secrets.MYSQL_URL}}
spring.minio.url: ${{secrets.MINIO_URL}}
spring.minio.bucket: ${{secrets.MINIO_BUCKET}}
spring.minio.access-key: ${{secrets.MINIO_USER}}
spring.minio.secret-key: ${{secrets.MINIO_PASSWORD}}
jwt.issuer: ${{secrets.TOKEN_ISSUER}}
jwt.base64-secret: ${{secrets.TOKEN_SECRET}}
jwt.TOKEN_EXPIRATION: ${{secrets.TOKEN_EXPIRATION}}
forecast.service-key: ${{secrets.FORECAST_SERVICE_KEY}}
forecast.url: ${{secrets.FORECAST_URL}}
# gradle 권한 추가
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# 프로젝트 빌드
- name: Build with Gradle
run: ./gradlew clean build
# Jacoco 테스트 결과 추가
- name: 📑 Jacoco 테스트 결과
id: jacoco
uses: madrapps/[email protected]
with:
paths: ${{github.workspace}}/**/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{secrets.GITHUB_TOKEN}}
min-coverage-overall: 70
min-coverage-changed-files: 70