[docs] update readme #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow 이름은 구별이 가능할 정도로 자유롭게 적어주어도 된다. | |
# 필수 옵션은 아니다. | |
name: Java CI with Gradle | |
# main 브랜치에 PR 이벤트가 발생하면 Workflow가 실행된다. | |
# 브랜치 구분이 없으면 on: [pull_request]로 해주어도 된다. | |
on: | |
pull_request: | |
branches: [ "develop" ] | |
# 테스트 결과 작성을 위해 쓰기권한 추가 | |
permissions: write-all | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Gradle Caching | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Grant Execute Permission For Gradlew | |
run: chmod +x gradlew | |
- name: Build With Gradle | |
run: ./gradlew build -x test | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
if: ${{ always() }} | |
with: | |
files: build/test-results/**/*.xml | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: '**/build/test-results/test/TEST-*.xml' |