Skip to content

[#39] 이미지 API 추가 #62

[#39] 이미지 API 추가

[#39] 이미지 API 추가 #62

Workflow file for this run

name: CI
on:
pull_request:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
## 리포지토리 체크아웃 및 submodule 업데이트
- name: get repository
uses: actions/checkout@v3
## JDK 17 설치
- name: install JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
# 환경 변수 설정
- name: Set up Environment
run: echo "${{ secrets.ENV }}" > ./.env # GitHub SecretKey 에서 설정한 내용으로 .env 파일 생성
## Gradle 빌드를 위한 실행 권한 부여
- name: grant permission to execute gradle command
run: chmod +x gradlew
# 도커 MYSQL 이미지 실행
- name: Create Mysql Docker Container
run: sudo docker run -d -p 3310:3306 --env MYSQL_DATABASE="${{ secrets.TEST_DATABASE }}" --env MYSQL_ROOT_PASSWORD="${{ secrets.TEST_ROOT_PASSWORD }}" mysql:8.0.33
## Gradle 빌드 실행
- name: run gradle build
run: ./gradlew build
## 오타 검사를 위해 typos-action 추가
- name: add typos-action as check spell
uses: crate-ci/[email protected]
with:
files: 'src/**'
## 테스트 커버리지 리포트 작성
- name: register test coverage as a comment in PR
id: jacoco
uses: madrapps/[email protected]
if: always()
with:
title: 테스트 커버리지 리포트입니다
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ github.token }}
min-coverage-overall: 80
min-coverage-changed-files: 80
## 테스트 실패시 코드 라인에 대한 체크 추가
- name: if test fail, add check comment on failed code line
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.html'
token: ${{ github.token }}