Skip to content

Commit

Permalink
CI: Migrated from Travis to Github Workflows CI (#1572)
Browse files Browse the repository at this point in the history
  • Loading branch information
rutvik-panchal authored Nov 28, 2020
1 parent 7687408 commit d9fd53c
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 35 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/feature_branch_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Workflow for feature branches

on:
push:
branches:
- '*'
- '!development'
- '!master'

jobs:
build:
name: Build APK
runs-on: ubuntu-latest
steps:
- name: Checking out repository
uses: actions/checkout@v2

# Set up JDK
- name: Set Up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

# Install NDK
- name: Install NDK
run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;20.0.5594570" --sdk_root=${ANDROID_SDK_ROOT}

# Update Gradle Permission
- name: Change gradlew Permission
run: chmod +x gradlew

# Build App
- name: Build with Gradle
run: ./gradlew assemble
75 changes: 75 additions & 0 deletions .github/workflows/master_dev_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Workflow for master/development branches

on:
pull_request:
push:
branches:
- 'development'
- 'master'

jobs:
build:
name: Build APK
runs-on: ubuntu-latest
steps:
- name: Checking out repository
uses: actions/checkout@v2

# Set up JDK
- name: Set Up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

# Install NDK
- name: Install NDK
run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;20.0.5594570" --sdk_root=${ANDROID_SDK_ROOT}

# Update Gradle Permission
- name: Change gradlew Permission
run: chmod +x gradlew

# Build App
- name: Build with Gradle
run: ./gradlew assemble

# Upload Built APK
- name: Upload Build Artifacts
uses: actions/[email protected]
with:
name: mifos-mobile
path: app/build/outputs/apk/debug/

lintCheck:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checking out repository
uses: actions/checkout@v2

- name: Static Analysis
run: ./gradlew lint

- name: Upload Static Analysis Report For Mifos-Mobile Module
uses: actions/[email protected]
if: failure()
with:
name: Static Analysis Report
path: app/build/reports/

pmd:
name: PMD
runs-on: ubuntu-latest
steps:
- name: Checking out repository
uses: actions/checkout@v2

- name: PMD Check
run: ./gradlew pmd

- name: Upload PMD Report
uses: actions/[email protected]
if: failure()
with:
name: PMD Report
path: app/build/reports/
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ An Android Application built on top of the MifosX Self-Service platform for end-

### Status

[![Join the chat at https://gitter.im/openMF/self-service-app](https://badges.gitter.im/openMF/self-service-app.svg)](https://gitter.im/openMF/self-service-app?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/openMF/mifos-mobile.svg?branch=development)](https://travis-ci.org/openMF/mifos-mobile)

| Master | Development | Chat |
|------------|-----------------|-----------------|
| ![Mifos-Mobile CI[Master/Dev]](https://github.com/openMF/mifos-mobile/workflows/Mifos-Mobile%20CI%5BMaster/Dev%5D/badge.svg?branch=master) | ![Mifos-Mobile CI[Master/Dev]](https://github.com/openMF/mifos-mobile/workflows/Mifos-Mobile%20CI%5BMaster/Dev%5D/badge.svg?branch=development) |[![Join the chat at https://gitter.im/openMF/self-service-app](https://badges.gitter.im/openMF/self-service-app.svg)](https://gitter.im/openMF/self-service-app?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)|

## Screenshots

Expand All @@ -29,7 +29,7 @@ We have the following branches :
* **development**
All the contributions should be pushed to this branch. If you're making a contribution,
you are supposed to make a pull request to _development_.
Please make sure it passes a build check on Travis.
Please make sure it passes a build check on Github Workflows CI.

It is advisable to clone only the development branch using the following command:

Expand All @@ -42,6 +42,12 @@ We have the following branches :
* **master**
The master branch contains all the stable and bug-free working code. The development branch once complete will be merged with this branch.

To get the latest apk of master/development branch from Github Artifacts, follow these steps:
1. Go to to the [Actions](https://github.com/openMF/mifos-mobile/actions) tab of this repository.
2. Select the latest workflow for master/development branch.
3. Click on hyperlink 'mifos-mobile' in Artifacts section.
4. Extract the downloaded file and get the apk.

## Development Setup

Before you begin, you should have already downloaded the Android Studio SDK and set it up correctly. You can find a guide on how to do this here: [Setting up Android Studio](http://developer.android.com/sdk/installing/index.html?pkg=studio).
Expand Down
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ apply from: '../config/quality/quality.gradle'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
ndkVersion rootProject.ext.ndkVersion

defaultConfig {
applicationId "org.mifos.mobile"
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ ext {
targetSdkVersion = 28
compileSdkVersion = 28
buildToolsVersion = '28.0.3'
ndkVersion = '21.3.6528147'

// App dependencies
supportLibraryVersion = '1.0.0'
Expand Down

0 comments on commit d9fd53c

Please sign in to comment.