diff --git a/.github/workflows/android-ci.yaml b/.github/workflows/android-ci.yaml new file mode 100644 index 0000000..b68df46 --- /dev/null +++ b/.github/workflows/android-ci.yaml @@ -0,0 +1,45 @@ +name: Kotlin CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + name: Build and test + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: "recursive" + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "17" + cache: "gradle" + + - name: Grant execute permission for gradlew + run: | + cd android + chmod +x gradlew + + - name: Auto-format with ktfmt + run: | + cd android + ./gradlew ktfmtFormat + + - name: Build with Gradle + run: | + cd android + ./gradlew build + + - name: Run tests + run: | + cd android + ./gradlew test