♻️ ci.yml #60
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 | |
on: | |
push: | |
branches: | |
- devel | |
- main | |
- 'feature_*' | |
pull_request_target: | |
branches: | |
- devel | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Clean Gradle build | |
run: ./gradlew clean | |
- name: Build with Gradle | |
run: ./gradlew build --stacktrace --info | |
env: | |
KAKAO_API_KEY: ${{ secrets.KAKAO_API_KEY }} | |
- name: Run ktlint | |
run: ./gradlew ktlintCheck --stacktrace --info || true | |
- name: Display ktlint report | |
if: failure() | |
run: cat app/build/reports/ktlint/ktlintKotlinScriptCheck/ktlintKotlinScriptCheck.txt | |
- name: Fail on ktlint issues | |
if: failure() | |
run: exit 1 | |
- name: Run unit tests | |
run: ./gradlew test |