ktlint 설정 #3
Workflow file for this run
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: Check Ktlint | |
on: | |
pull_request: | |
types: [ opened, synchronize, ready_for_review, reopened ] | |
jobs: | |
gradleValidation: | |
name: Gradle Validation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v3 | |
- name: Gradle Wrapper Validation | |
uses: gradle/actions/wrapper-validation@v4 | |
check: | |
name: Check Kotlin | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Gradle Wrapper Permissions | |
run: chmod +x gradlew | |
- name: Run ktlintCheck | |
run: ./gradlew ktlintCheck |