Skip to content

Commit

Permalink
chore: 안드로이드 CI 파일 작성 (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaehyuns authored Jul 24, 2024
1 parent 37cad6c commit f0e5c19
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Android CI

on:
push:
branches: [ "develop-AN" ]
paths:
- 'android/**'
pull_request:
branches: [ "develop-AN" ]
paths:
- 'android/**'

defaults:
run:
working-directory: ./android

jobs:
ktlint_check:
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', '**/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: Ktlint check
run: ./gradlew ktlintCheck

build_and_test:
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', '**/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: Gradle Clean check
run: ./gradlew clean

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

- name: Run Unit Test
run: ./gradlew test

0 comments on commit f0e5c19

Please sign in to comment.