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
|
2024-02-24 07:48:44 +01:00
|
|
|
uses: actions/checkout@v4
|
2023-07-10 21:02:14 +02:00
|
|
|
|
2024-02-24 07:48:53 +01:00
|
|
|
- uses: actions/setup-java@v4
|
2023-07-10 21:02:14 +02:00
|
|
|
with:
|
2024-02-23 12:28:13 +01:00
|
|
|
java-version: '21'
|
2023-07-10 21:02:14 +02:00
|
|
|
distribution: 'temurin'
|
|
|
|
|
|
|
|
- name: Gradle Wrapper Validation
|
2024-08-06 20:09:59 +02:00
|
|
|
uses: gradle/actions/wrapper-validation@v4
|
2023-07-10 21:02:14 +02:00
|
|
|
|
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
|
2024-02-24 07:49:45 +01:00
|
|
|
uses: gradle/gradle-build-action@v3
|
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
|