2023-07-10 21:02:14 +02:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
pull_request:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- uses: actions/setup-java@v3
|
|
|
|
with:
|
2023-07-30 15:50:04 +02:00
|
|
|
java-version: '17'
|
2023-07-10 21:02:14 +02:00
|
|
|
distribution: 'temurin'
|
|
|
|
|
|
|
|
- name: Gradle Wrapper Validation
|
|
|
|
uses: gradle/wrapper-validation-action@v1
|
|
|
|
|
2023-08-08 23:04:29 +02:00
|
|
|
- name: Copy CI gradle.properties
|
|
|
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
|
|
|
|
2023-07-10 21:02:14 +02:00
|
|
|
- name: Gradle Build Action
|
|
|
|
uses: gradle/gradle-build-action@v2
|
2023-07-12 13:26:30 +02:00
|
|
|
with:
|
|
|
|
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
|
2023-07-30 15:50:04 +02:00
|
|
|
|
2023-07-10 21:02:14 +02:00
|
|
|
- name: ktlint
|
|
|
|
run: ./gradlew clean ktlintCheck
|
2023-07-30 15:50:04 +02:00
|
|
|
|
2023-07-10 21:02:14 +02:00
|
|
|
- name: Regular lint
|
2023-07-12 13:26:30 +02:00
|
|
|
run: ./gradlew app:lintGreenDebug
|
2023-07-30 15:50:04 +02:00
|
|
|
|
2023-07-10 21:02:14 +02:00
|
|
|
- name: Test
|
|
|
|
run: ./gradlew app:testGreenDebugUnitTest
|
2023-07-30 15:50:04 +02:00
|
|
|
|
2023-07-10 21:02:14 +02:00
|
|
|
- name: Build
|
2023-07-12 13:26:30 +02:00
|
|
|
run: ./gradlew app:buildGreenDebug
|