Skip to content

Commit 6a588e4

Browse files
author
Melih Aksoy
committed
Run tests on CI
1 parent 0b38738 commit 6a588e4

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

.circleci/config.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,28 @@ jobs:
1414
# name: Chmod permissions #if permission for Gradlew Dependencies fail, use this.
1515
# command: sudo chmod +x ./gradlew
1616
- run:
17-
name: Install bundle
17+
name: Setup
1818
command: |
1919
gem install bundler
2020
bundle install
21+
mkdir ~/code/reports
22+
23+
# Detekt
2124
- run:
2225
name: Detekt
2326
command: fastlane detekt
2427
- store_artifacts: # for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
2528
path: reports/detekt
2629
- store_test_results: # for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/
27-
path: reports/tests
30+
path: reports
31+
32+
# Tests
33+
- run:
34+
name: Tests
35+
command: fastlane test_all
36+
- store_artifacts: # for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
37+
path: build/reports/tests
38+
- store_test_results: # for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/
39+
path: reports
40+
2841
# See https://circleci.com/docs/2.0/deployment-integrations/ for deploy examples

fastlane/Fastfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ platform :android do
4646
end
4747

4848
def run_all_tests
49-
gradle(task: "test --continue")
49+
gradle(task: "clean test --continue")
5050
end
5151
end

scripts/default_dependencies.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
apply plugin: "de.mannodermaus.android-junit5"
12
apply from: "$rootProject.projectDir/scripts/detekt.gradle"
23
apply from: "$rootProject.projectDir/scripts/dokka.gradle"
34

@@ -13,4 +14,6 @@ dependencies {
1314
testImplementation testLibraries.jUnitApi
1415
testImplementation testLibraries.mockk
1516
testImplementation testLibraries.kluent
17+
18+
testRuntimeOnly testLibraries.jUnitEngine
1619
}

scripts/sources.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ android {
99
sourceCompatibility JavaVersion.VERSION_1_8
1010
targetCompatibility JavaVersion.VERSION_1_8
1111
}
12+
13+
kotlinOptions {
14+
jvmTarget = '1.8'
15+
}
1216
}

0 commit comments

Comments
 (0)