Skip to content

Commit 446cff3

Browse files
committed
Added CI via github actions
1 parent be64f94 commit 446cff3

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

.github/workflows/build_and_test.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- 'main'
8+
9+
jobs:
10+
build_and_test_with_code_coverage:
11+
name: Build, test and upload code coverage
12+
runs-on: ubuntu-20.04
13+
14+
steps:
15+
# actions/checkout v1.* is needed for correct codecov upload, see https://github.com/actions/checkout/issues/237 for details
16+
- uses: actions/checkout@v1
17+
# ensure that gradle wrapper files in repository are valid by checking checksums
18+
- uses: gradle/wrapper-validation-action@v1
19+
- name: Set up JDK 11
20+
uses: actions/setup-java@v1
21+
with:
22+
java-version: 1.11
23+
- uses: burrunan/gradle-cache-action@v1
24+
name: Gradle build with caches caching
25+
with:
26+
arguments: build
27+
gradle-version: wrapper
28+
- name: Upload test reports
29+
if: ${{ failure() }} # runs only if previous step has failed, the entire workflow will still be marked as failed
30+
uses: actions/upload-artifact@v2
31+
with:
32+
name: gradle-test-report
33+
path: '**/build/reports/'
34+
- name: Code coverage report
35+
# disabled until repo is private
36+
uses: codecov/codecov-action@v1
37+
with:
38+
flags: unittests
39+
fail_ci_if_error: true # optional (default = false)

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# kotlin-diff-utils
2+
![Build and test](https://github.com/petertrr/kotlin-diff-utils/workflows/Build%20and%20test/badge.svg)
3+
[![License](https://img.shields.io/github/license/petertrr/kotlin-diff-utils)](https://github.com/petertrr/kotlin-diff-utils/blob/main/LICENSE)
4+
[![codecov](https://codecov.io/gh/petertrr/kotlin-diff-utils/branch/main/graph/badge.svg)](https://codecov.io/gh/petertrr/kotlin-diff-utils)
5+
26
This is a port of [java-diff-utils](https://github.com/java-diff-utils/java-diff-utils) to kotlin
37
with multiplatform support. All credit for the implementation goes to original authors.
48

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
}
99

1010
group = "io.github.petertrr"
11-
version = "0.0.1-SNAPSHOT"
11+
version = "0.1.0-SNAPSHOT"
1212

1313
repositories {
1414
mavenCentral()

0 commit comments

Comments
 (0)