Skip to content

[CHORE] dev, prod 서버 환경 분리 #395

[CHORE] dev, prod 서버 환경 분리

[CHORE] dev, prod 서버 환경 분리 #395

Workflow file for this run

name: Owori Backend CI
on:
pull_request:
branches: ["main", "develop"]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the code
- name: Checkout
uses: actions/checkout@v3
# Set up JDK 17
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
architecture: x64
# Set up ENV (prod)
- name: Set ENV
if: github.ref == 'refs/heads/main'
run: |
mkdir -p src/main/resources
echo "${{ secrets.ENV_PROD_YML }}" | base64 --decode > src/main/resources/env.yml
# Set up ENV (dev)
- name: Set ENV
if: github.ref == 'refs/heads/develop'
run: |
mkdir -p src/main/resources
echo "${{ secrets.ENV_DEV_YML }}" | base64 --decode > src/main/resources/env.yml
# Build with Gradle
- name: grant permission
run: chmod +x gradlew
# Build with Gradle
- name: Build with Gradle
run: ./gradlew build
# Test with Gradle
- name: Test Coverage Report
id: jacoco
uses: madrapps/[email protected]
with:
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
title: "테스트 커버리지 측정"
min-coverage-overall: 50
min-coverage-changed-files: 50