2023-02-13 10:39:58 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
merge_group:
|
2019-12-15 21:49:18 +00:00
|
|
|
|
|
|
|
name: Check pull request
|
2021-09-29 12:00:32 +00:00
|
|
|
|
|
|
|
concurrency:
|
2023-12-20 05:18:57 +00:00
|
|
|
group: ${{ github.head_ref || github.ref_name }}
|
2021-09-29 12:00:32 +00:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-02-22 09:03:03 +00:00
|
|
|
env:
|
|
|
|
SENTRY_DSN: 'https://public_key@example.com/project_id'
|
|
|
|
|
2019-10-02 05:14:16 +00:00
|
|
|
jobs:
|
2021-12-07 10:06:41 +00:00
|
|
|
check-codestyle:
|
2021-05-22 13:17:09 +00:00
|
|
|
runs-on: ubuntu-latest
|
2019-10-02 05:14:16 +00:00
|
|
|
steps:
|
2022-10-29 02:56:46 +00:00
|
|
|
- name: Checkout repository
|
2023-10-18 05:53:34 +00:00
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up JDK
|
2023-11-29 17:59:42 +00:00
|
|
|
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
|
|
|
distribution: temurin
|
2023-08-26 15:26:48 +00:00
|
|
|
java-version: 20
|
2022-10-29 02:56:46 +00:00
|
|
|
|
|
|
|
- name: Copy CI gradle.properties
|
|
|
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
|
|
|
|
|
|
|
- name: Check codestyle
|
2024-01-25 05:13:38 +00:00
|
|
|
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
|
|
|
arguments: ktfmtCheck
|
|
|
|
gradle-home-cache-cleanup: true
|
|
|
|
|
|
|
|
- name: Upload Kotlin build report
|
|
|
|
if: "${{ always() }}"
|
2024-01-23 19:52:58 +00:00
|
|
|
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
2023-12-15 04:30:37 +00:00
|
|
|
name: Build report (check-codestyle)
|
2022-10-29 02:56:46 +00:00
|
|
|
path: build/reports/kotlin-build/
|
2021-12-07 10:06:41 +00:00
|
|
|
|
|
|
|
unit-tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-29 02:56:46 +00:00
|
|
|
- name: Checkout repository
|
2023-10-18 05:53:34 +00:00
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up JDK
|
2023-11-29 17:59:42 +00:00
|
|
|
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
|
|
|
distribution: temurin
|
2023-08-26 15:26:48 +00:00
|
|
|
java-version: 20
|
2022-10-29 02:56:46 +00:00
|
|
|
|
|
|
|
- name: Copy CI gradle.properties
|
|
|
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
|
|
|
|
|
|
|
- name: Run unit tests
|
2024-01-25 05:13:38 +00:00
|
|
|
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
|
|
|
arguments: test -PslimTests
|
|
|
|
gradle-home-cache-cleanup: true
|
|
|
|
|
|
|
|
- name: (Fail-only) Upload test report
|
|
|
|
if: "${{ failure() }}"
|
2024-01-23 19:52:58 +00:00
|
|
|
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
2023-12-15 04:30:37 +00:00
|
|
|
name: Test report (unit-tests)
|
2020-07-26 11:18:03 +00:00
|
|
|
path: app/build/reports
|
2021-12-07 10:06:41 +00:00
|
|
|
|
2022-10-29 02:56:46 +00:00
|
|
|
- name: Upload Kotlin build report
|
|
|
|
if: "${{ always() }}"
|
2024-01-23 19:52:58 +00:00
|
|
|
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
2023-12-15 04:30:37 +00:00
|
|
|
name: Build report (unit-tests)
|
2022-10-29 02:56:46 +00:00
|
|
|
path: build/reports/kotlin-build/
|
2022-06-10 17:57:56 +00:00
|
|
|
|
2021-12-07 10:06:41 +00:00
|
|
|
build-apks:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-29 02:56:46 +00:00
|
|
|
- name: Checkout repository
|
2023-10-18 05:53:34 +00:00
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up JDK
|
2023-11-29 17:59:42 +00:00
|
|
|
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
|
|
|
distribution: temurin
|
2023-08-26 15:26:48 +00:00
|
|
|
java-version: 20
|
2022-10-29 02:56:46 +00:00
|
|
|
|
|
|
|
- name: Copy CI gradle.properties
|
|
|
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
|
|
|
|
|
|
|
- name: Build debug APKs
|
2024-01-25 05:13:38 +00:00
|
|
|
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
2022-11-08 16:01:21 +00:00
|
|
|
arguments: assembleFreeDebug assembleNonFreeDebug assembleNonFreeRelease
|
2022-10-29 02:56:46 +00:00
|
|
|
gradle-home-cache-cleanup: true
|
|
|
|
|
|
|
|
- name: Upload Kotlin build report
|
|
|
|
if: "${{ always() }}"
|
2024-01-23 19:52:58 +00:00
|
|
|
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
2023-12-15 04:30:37 +00:00
|
|
|
name: Build report (build-apks)
|
2022-10-29 02:56:46 +00:00
|
|
|
path: build/reports/kotlin-build/
|
2021-12-07 10:06:41 +00:00
|
|
|
|
|
|
|
check-api:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-29 02:56:46 +00:00
|
|
|
- name: Checkout repository
|
2023-10-18 05:53:34 +00:00
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up JDK
|
2023-11-29 17:59:42 +00:00
|
|
|
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
|
|
|
distribution: temurin
|
2023-08-26 15:26:48 +00:00
|
|
|
java-version: 20
|
2022-10-29 02:56:46 +00:00
|
|
|
|
|
|
|
- name: Copy CI gradle.properties
|
|
|
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
|
|
|
|
|
|
|
- name: Check library API
|
2024-01-25 05:13:38 +00:00
|
|
|
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
|
|
|
arguments: metalavaCheckCompatibilityRelease
|
|
|
|
gradle-home-cache-cleanup: true
|
|
|
|
|
|
|
|
- name: Upload Kotlin build report
|
|
|
|
if: "${{ always() }}"
|
2024-01-23 19:52:58 +00:00
|
|
|
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
2022-10-29 02:56:46 +00:00
|
|
|
with:
|
2023-12-15 04:30:37 +00:00
|
|
|
name: Build report (check-api)
|
2022-10-29 02:56:46 +00:00
|
|
|
path: build/reports/kotlin-build/
|
2022-07-17 08:37:50 +00:00
|
|
|
|
2023-04-27 09:12:11 +00:00
|
|
|
lint:
|
2022-07-17 08:37:50 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2023-10-18 05:53:34 +00:00
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
2022-07-17 08:37:50 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up JDK
|
2023-11-29 17:59:42 +00:00
|
|
|
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
|
2022-07-17 08:37:50 +00:00
|
|
|
with:
|
|
|
|
distribution: temurin
|
2023-08-26 15:26:48 +00:00
|
|
|
java-version: 20
|
2022-07-17 08:37:50 +00:00
|
|
|
|
|
|
|
- name: Copy CI gradle.properties
|
|
|
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
|
|
|
|
2023-04-27 09:12:11 +00:00
|
|
|
- name: Run Lint
|
2024-01-25 05:13:38 +00:00
|
|
|
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
|
2022-07-17 08:37:50 +00:00
|
|
|
with:
|
2023-04-27 09:12:11 +00:00
|
|
|
arguments: lint
|
2022-08-30 16:38:46 +00:00
|
|
|
gradle-home-cache-cleanup: true
|
2022-07-17 08:37:50 +00:00
|
|
|
|
|
|
|
- name: Upload Kotlin build report
|
|
|
|
if: "${{ always() }}"
|
2024-01-23 19:52:58 +00:00
|
|
|
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
2022-07-17 08:37:50 +00:00
|
|
|
with:
|
2023-12-15 04:30:37 +00:00
|
|
|
name: Build report (lint)
|
2022-07-17 08:37:50 +00:00
|
|
|
path: build/reports/kotlin-build/
|