Skip to content

Refactor : 테스트 ci , 배포 ci 분리 #5

Refactor : 테스트 ci , 배포 ci 분리

Refactor : 테스트 ci , 배포 ci 분리 #5

Workflow file for this run

name: Docker Image CI
on:
pull_request:
branches: [ "main", "develop" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Github Repository 에 올린 파일들을 볼러오기
uses: actions/checkout@v4
- name: JDK 17 버전 설치
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: application.yml 파일 만들기
run: |
mkdir -p ./src/main/resources
echo "${{ secrets.APPLICATION_YML }}" > ./src/main/resources/application.yml
echo "${{ secrets.APPLICATION_COMMON }}" > ./src/main/resources/application-common.yml
echo "${{ secrets.APPLICATION_TEST }}" > ./src/main/resources/application-test.yml
- name: gradlew 실행 권한 부여
run: chmod +x ./gradlew
- name: Gradle packages 캐시
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle
- name: Gradle wrapper 캐시
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: 테스트
run : ./gradlew clean test -PspringProfile=test --info