-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (52 loc) · 1.87 KB
/
android.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Android CI
on:
pull_request:
branches: [ "main", "develop" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Gradle 캐싱: 빌드 시간과 네트워크 통신을 줄이기 위해 의존성 패키지들을 캐싱하여 재사용
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Access Google Client Id
env:
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
run: |
echo "GOOGLE_CLIENT_ID=\"$GOOGLE_CLIENT_ID\"" >> local.properties
- name: Access YOUTH POLICY API KEY
env:
YOUTH_POLICY_API_KEY: ${{ secrets.YOUTH_POLICY_API_KEY }}
run: |
echo "YOUTH_POLICY_API_KEY=\"YOUTH_POLICY_API_KEY\"" >> local.properties
- name: Access BaseUrl
env:
YOUTH_POLICY_API_KEY: ${{ secrets.BASE_URL }}
run: |
echo "BASE_URL=\"BASE_URL\"" >> local.properties
- name: Create google-services in app
run: |
echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json
- name: Create google-services in analytics
run: |
echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./core/analytics/google-services.json
- name: Run test
run: ./gradlew test --parallel
- name: Run ktlint
run: ./gradlew ktlintCheck