Skip to content

자동 PR 리뷰를 위한 workflow 파일 추가 by f-lab #200

자동 PR 리뷰를 위한 workflow 파일 추가 by f-lab

자동 PR 리뷰를 위한 workflow 파일 추가 by f-lab #200

Workflow file for this run

name: 굿즈포유 CI
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: get repository
uses: actions/checkout@v3
with:
token: ${{secrets.GOODSFORYOU_TOKEN}}
submodules: recursive
- name: install JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- uses: actions/checkout@v3
- run: touch ./src/main/resources/application-aws.yml
- run: echo "${{secrets.APPLICATION_AWS}}" > ./src/main/resources/application-aws.yml
- name: SetUp MySQL
uses: mirromutth/[email protected]
with:
mysql version: '8.0.27'
mysql database: 'GoodsForYou'
mysql user: 'admin'
mysql password: '1234'
- name: grant permission to execute gradle command
run: chmod +x gradlew
- name: run gradle build
run: ./gradlew build --stacktrace
- 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: ${{ secrets.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-*.xml'
token: ${{ github.token }}