Merge pull request #36 from dnd-side-project/feat/ddd #79
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
name: CI - Gradle Build | |
# Event | |
on: | |
push: | |
branches: | |
- develop | |
- 'feat/test' | |
# 권한 설정 | |
permissions: write-all | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
# 환경 변수 설정 | |
- name: Set up Environment | |
run: echo "${{ secrets.ENV_PROPERTIES }}" > ./.env | |
# 빌드시 캐시 적용 | |
- name: Cache 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: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
shell: bash | |
- name: Build with Gradle | |
run: ./gradlew build -x test | |
- name: Test with Gradle | |
run: ./gradlew test | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
if: ${{ always() }} | |
with: | |
files: build/test-results/**/*.xml | |
- name: Report Code Coverage | |
uses: codecov/codecov-action@v1 |