chore: ktlint formatting #186
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: API CI | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- develop | |
types: [ opened, synchronize, reopened ] | |
jobs: | |
build: | |
name: CI | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
kotlin-version: [ "1.9.23" ] | |
java-version: [ "17" ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Kotlin | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java-version }} | |
kotlin-version: ${{ matrix.kotlin-version }} | |
distribution: 'corretto' | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', '*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
# 빌드, ktlint check도 진행됨 | |
- name: Gradle Clean & Build | |
run: ./gradlew clean :api:build --no-daemon | |
# # jacoco, sonarcube | |
# - name: test and analyze | |
# run: ./gradlew test sonar --stacktrace --no-daemon | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }} | |
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |