Skip to content

Commit 20b9f51

Browse files
committed
Fix tests, add CI
1 parent af45748 commit 20b9f51

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [ ubuntu-latest ]
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up JDK 17
14+
uses: actions/setup-java@v3
15+
with:
16+
java-version: '17'
17+
distribution: 'adopt'
18+
19+
- name: Validate Gradle wrapper
20+
uses: gradle/actions/wrapper-validation@v3
21+
22+
- name: 'Run Jdbc, Android, and Native-Linux Tests'
23+
if: matrix.os == 'ubuntu-latest'
24+
run: >-
25+
./gradlew build --stacktrace

build.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,17 @@ dependencies {
2525
implementation("io.zonky.test:embedded-postgres:2.0.7")
2626
implementation("io.zonky.test.postgres:embedded-postgres-binaries-linux-amd64:16.2.0")
2727

28+
// OPTIONAL: Just for testing
2829
testImplementation(kotlin("test"))
2930
testImplementation(kotlin("test-common"))
3031
testImplementation(kotlin("test-annotations-common"))
3132
}
3233

33-
tasks.test {
34-
useJUnitPlatform()
34+
// OPTIONAL: Make tests show in the build log even when they pass
35+
tasks.withType<Test>().configureEach {
36+
testLogging {
37+
events("passed", "skipped", "failed")
38+
showStandardStreams = true
39+
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
40+
}
3541
}

0 commit comments

Comments
 (0)