Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #131 from burhanrashid52/add_circle_ci
Browse files Browse the repository at this point in the history
Added circle ci
  • Loading branch information
burhanrashid52 committed Jan 27, 2019
2 parents 1a625ef + 690430b commit c4e90c4
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 6 deletions.
62 changes: 62 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,62 @@
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-28-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Chmod permissions
command: sudo chmod +x ./gradlew
- run:
name: Accept licenses
command: yes | sdkmanager --licenses || true
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Lists installed targets
command: android list target
environment:
TERM: dumb
- run:
name: Show list of system-images
command: sdkmanager --list --verbose | grep system-images
- run:
name: Setup Emulator
command: sdkmanager "system-images;android-21;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-21;default;armeabi-v7a"
- run:
name: Launch Emulator
command: |
cd ${ANDROID_HOME}/emulator;ls
export LD_LIBRARY_PATH=${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/qt/lib
emulator -avd test -no-window -noaudio -no-boot-anim -no-window -accel on
background: true
- run:
name: Wait emulator
command: |
circle-android wait-for-boot
adb shell input keyevent 82
- run:
name: Run Espresso UI Tests
command: ./gradlew :app:connectedDebugAndroidTest
- run:
name: Run UnitTest
command: ./gradlew testDebugUnitTest
- store_artifacts:
path: app/build/reports
destination: reports
- store_artifacts:
path: app/build/outputs/apk
destination: apks
- store_test_results:
path: app/build/test-results
7 changes: 4 additions & 3 deletions README.md
@@ -1,9 +1,10 @@
# PhotoEditor

[![CircleCI](https://circleci.com/gh/burhanrashid52/PhotoEditor.svg?style=svg)](https://circleci.com/gh/burhanrashid52/PhotoEditor)
[![Downloads](https://img.shields.io/badge/Download-0.3.3-blue.svg)](https://bintray.com/burhanrashid52/maven/photoeditor) ![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg) [![JavaDoc](https://img.shields.io/badge/JavaDoc-PhotoEditor-blue.svg)](https://burhanrashid52.github.io/PhotoEditor/) [![Uplabs](https://img.shields.io/badge/Uplabs-PhotoEditor-orange.svg)](https://www.uplabs.com/posts/photoeditor)
[![AndroidArsenal](https://img.shields.io/badge/Android%20Arsenal-PhotoEditor-blue.svg)](https://android-arsenal.com/details/1/6736)
[![AndroidDevDigest](https://img.shields.io/badge/AndroidDev%20Digest-%23185-brightgreen.svg)](https://www.androiddevdigest.com/digest-185)
[![AwesomeAndroid](https://img.shields.io/badge/Awesome%20Android-%2397-red.svg)](https://android.libhunt.com/newsletter/97)
[![AndroidArsenal](https://img.shields.io/badge/Android%20Arsenal-PhotoEditor-blue.svg)](https://android-arsenal.com/details/1/6736)
[![AndroidDevDigest](https://img.shields.io/badge/AndroidDev%20Digest-%23185-brightgreen.svg)](https://www.androiddevdigest.com/digest-185)
[![AwesomeAndroid](https://img.shields.io/badge/Awesome%20Android-%2397-red.svg)](https://android.libhunt.com/newsletter/97)
[![AndroidWeekly](https://img.shields.io/badge/Android%20Weekly-%23312-blue.svg)](http://androidweekly.net/issues/issue-312)
[![Mindorks](https://img.shields.io/badge/Mindorks%20Newsletter-%234-ff69b4.svg)](https://mindorks.com/newsletter/edition/4)

Expand Down
8 changes: 7 additions & 1 deletion app/build.gradle
Expand Up @@ -21,11 +21,17 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:27.1.1'
implementation 'ja.burhanrashid52:photoeditor:0.3.3'
//implementation project(':photoeditor')
implementation 'com.android.support:cardview-v7:27.1.1'

testImplementation 'junit:junit:4.12'

androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

// make sure this line comes *after* you apply the Android plugin
Expand Down
@@ -0,0 +1,28 @@
package com.burhanrashid52.imageeditor;

import android.support.test.filters.LargeTest;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withText;


@RunWith(AndroidJUnit4.class)
@LargeTest
public class EditImageActivityTest {

@Rule
public ActivityTestRule<EditImageActivity> mActivityRule = new ActivityTestRule<>(EditImageActivity.class);

@Test
public void checkIfActivityIsLaunched() {
onView(withText(R.string.app_name)).check(matches(isDisplayed()));
}
}
14 changes: 14 additions & 0 deletions app/src/test/java/com/burhanrashid52/imageeditor/SampleTest.java
@@ -0,0 +1,14 @@
package com.burhanrashid52.imageeditor;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class SampleTest {

@Test
public void testAddition() {
assertEquals(6, 3 + 3);
}

}
5 changes: 3 additions & 2 deletions photoeditor/build.gradle
Expand Up @@ -27,6 +27,7 @@ ext {
}

android {

compileSdkVersion 27
buildToolsVersion '27.0.3'

Expand Down Expand Up @@ -63,5 +64,5 @@ dependencies {
}

// Place it at the end of the file
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'

0 comments on commit c4e90c4

Please sign in to comment.