Skip to content

Commit

Permalink
Add github CI workflow for formatting/lint checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ishubhamsingh committed Sep 20, 2023
1 parent 76bad27 commit 27b95e2
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/ci-gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
org.gradle.daemon=false
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx5120m
org.gradle.workers.max=2

kotlin.incremental=false
kotlin.compiler.execution.strategy=in-process
42 changes: 42 additions & 0 deletions .github/workflows/Check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Check

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: macos-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
distribution: zulu
cache: 'gradle'

- name: Check formatting
run: ./gradlew spotlessCheck lintRelease --stacktrace

- name: Upload build reports
if: always()
uses: actions/upload-artifact@v2
with:
name: build-reports
path: app/build/reports
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ kamel = "0.6.0"
materialKolor = "1.2.0"
spotless = "6.20.0"
ktfmt = "0.44"
precompose = "1.5.0-beta01"
precompose = "1.5.1"
moko-mvvm = "0.16.1"
moko-permissions = "0.16.0"
kotlinx-datetime = "0.4.0"
Expand Down

0 comments on commit 27b95e2

Please sign in to comment.