-
Notifications
You must be signed in to change notification settings - Fork 600
83 lines (75 loc) · 2.62 KB
/
pr-check-android.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
## Overview
#
# This reusable GitHub Actions workflow provides a comprehensive Continuous Integration (CI) pipeline
# for multi-platform mobile and desktop applications, specifically designed for projects using Gradle and Java/Kotlin.
#
### Key Features
# - Automated code quality checks
# - Dependency management and verification
# - Cross-platform desktop application builds (Windows, Linux, MacOS)
# - Android APK build generation
# - Artifact generation and storage
#
### Workflow Jobs
# 1. **Setup**: Prepares the build environment
# - Checks out repository code
# - Sets up Java 17
# - Configures Gradle
# - Manages dependency caching
#
# 2. **Code Quality Checks**:
# - Build logic verification
# - Code formatting checks (Spotless)
# - Static code analysis (Detekt)
#
# 3. **Dependency Guard**:
# - Verifies dependencies against baseline
# - Prevents unauthorized dependency changes
# - Supports automatic baseline updates
#
# 4. **Android App Build**:
# - Builds debug APK for demo flavor
# - Uploads APK artifacts
#
### Prerequisites
# - Java 17
# - Gradle
# - Configured build scripts for:
# - Android module
# - Desktop module
# - Installed Gradle plugins:
# - Spotless
# - Detekt
# - Dependency Guard
#
### Configuration Parameters
# The workflow requires two input parameters:
#
# | Parameter | Description | Type | Required |
# |------------------------|------------------------------------|--------|----------|
# | `android_package_name` | Name of the Android project module | String | Yes |
#
# https://github.com/openMF/mifos-mobile-github-actions/blob/main/.github/workflows/pr-check-android.yaml
# ##############################################################################
# DON'T EDIT THIS FILE UNLESS NECESSARY #
# ##############################################################################
name: PR Checks
# Trigger conditions for the workflow
on:
push:
branches: [ dev ] # Runs on pushes to dev branch
pull_request: # Runs on all pull requests
workflow_dispatch: # Allows manual triggering of the workflow
# Concurrency settings to prevent multiple simultaneous workflow runs
concurrency:
group: pr-${{ github.ref }}
cancel-in-progress: true # Cancels previous runs if a new one is triggered
permissions:
contents: write
jobs:
pr_checks:
name: PR Checks
uses: openMF/mifos-mobile-github-actions/.github/workflows/pr-check-android.yaml@main
secrets: inherit
with:
android_package_name: 'mifosng-android' # <-- Change Your Android Package Name