Skip to content

Commit

Permalink
Merge pull request #505 from Team-WSS/feat/476
Browse files Browse the repository at this point in the history
build: ktlint CI 적용
  • Loading branch information
m6z1 authored Dec 31, 2024
2 parents ac13eae + 9211b60 commit 99f8d1b
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
64 changes: 64 additions & 0 deletions .github/workflows/WSS_PR_builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Android CI

on:
push:
branches: [ "develop", "release_wss", "release/*", "hotfix" ]
pull_request:
branches: [ "develop", "release_wss", "release/*", "hotfix" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Load Google Service file
env:
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: echo $DATA | base64 -di > app/google-services.json

- name: Create local.properties
env:
BASE_URL: ${{ secrets.BASE_URL }}
S3_BASE_URL: ${{ secrets.S3_BASE_URL }}
KAKAO_APP_KEY: ${{ secrets.KAKAO_APP_KEY }}
AMPLITUDE_KEY: ${{ secrets.AMPLITUDE_KEY }}
run: |
echo base.url=\"$BASE_URL\" >> ./local.properties
echo s3.url=\"$S3_BASE_URL\" >> ./local.properties
echo kakao.app.key=\"$KAKAO_APP_KEY\" >> ./local.properties
echo amplitude.key=\"$AMPLITUDE_KEY\" >> ./local.properties
- name: Run Ktlint
uses: ScaCap/action-ktlint@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
android: true
fail_on_error: true
reporter: github-pr-review

- name: Build with Gradle
run: ./gradlew build

0 comments on commit 99f8d1b

Please sign in to comment.