Skip to content

Add github action

Add github action #5

name: Checks and Tests
on:
workflow_dispatch:
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
gradleTask: [assembleDebug testDebugUnitTest, lintDebug, ktlintCheck]
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 21
distribution: temurin
cache: 'gradle'
- name: Check Gradle
uses: gradle/actions/wrapper-validation@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew ${{ matrix.gradleTask }}