Skip to content

Commit 2cedcbe

Browse files
authored
Add GitHub build action (#57)
1 parent d4dc82a commit 2cedcbe

File tree

4 files changed

+261
-202
lines changed

4 files changed

+261
-202
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: r2-opds-kotlin
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
pull_request:
7+
branches: [ develop ]
8+
9+
jobs:
10+
build:
11+
name: Build and test
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v2
19+
with:
20+
java-version: '11'
21+
distribution: 'adopt'
22+
- name: Build
23+
run: ./gradlew clean build -x test
24+
- name: Test
25+
run: ./gradlew test --continue

readium/opds/r2-opds/build.gradle

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ android {
2525
sourceCompatibility 1.8
2626
targetCompatibility 1.8
2727
}
28+
testOptions {
29+
unitTests.includeAndroidResources = true
30+
}
2831
buildTypes {
2932
release {
3033
minifyEnabled false
@@ -39,7 +42,7 @@ dependencies {
3942
if (findProject(':r2-shared')) {
4043
implementation project(':r2-shared')
4144
} else {
42-
implementation "com.github.readium:r2-shared-kotlin:2.0.0"
45+
implementation "com.github.readium:r2-shared-kotlin:develop-SNAPSHOT"
4346
}
4447

4548
implementation "androidx.appcompat:appcompat:1.3.0-beta1"
@@ -48,8 +51,18 @@ dependencies {
4851
implementation "nl.komponents.kovenant:kovenant:3.3.0"
4952
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3"
5053

54+
testImplementation "androidx.test.ext:junit-ktx:1.1.2"
55+
testImplementation "androidx.test:core-ktx:1.3.0"
5156
testImplementation "junit:junit:4.13.2"
57+
testImplementation "net.sf.kxml:kxml2:2.3.0"
58+
testImplementation 'org.assertj:assertj-core:3.19.0'
59+
testImplementation "org.jetbrains.kotlin:kotlin-reflect"
5260
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
61+
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.2"
62+
testImplementation "org.json:json:20200518"
63+
testImplementation "org.mockito:mockito-core:3.3.3"
64+
testImplementation 'org.robolectric:robolectric:4.5.1'
65+
testImplementation "xmlpull:xmlpull:1.1.3.1"
5366

5467
androidTestImplementation "androidx.test.espresso:espresso-core:3.3.0"
5568
androidTestImplementation "androidx.test:runner:1.3.0"

0 commit comments

Comments
 (0)