diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2c79952..5281b1e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -94,6 +94,13 @@ jobs: with: gradle-version: 6.8 arguments: test -x testSql + - name: Coverage + uses: eskatos/gradle-command-action@v1 + with: + gradle-version: 6.8 + arguments: coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} lint: needs: build diff --git a/README.md b/README.md index 0031dba..6f02438 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![CodeFactor](https://www.codefactor.io/repository/github/flecomte/dc-project/badge?s=869dc426625a253a07bea95f9380e23fdb048b94)](https://www.codefactor.io/repository/github/flecomte/dc-project) [![Tests](https://github.com/flecomte/dc-project/actions/workflows/tests.yml/badge.svg)](https://github.com/flecomte/dc-project/actions/workflows/tests.yml) +[![Coverage Status](https://coveralls.io/repos/github/flecomte/dc-project/badge.svg?branch=master)](https://coveralls.io/github/flecomte/dc-project?branch=master) + [Installation](./doc/installation/Installation.md) diff --git a/build.gradle.kts b/build.gradle.kts index 812ac92..cf30e10 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -41,6 +41,7 @@ plugins { id("net.nemerosa.versioning") version "2.14.0" id("io.gitlab.arturbosch.detekt") version "1.16.0-RC1" id("com.avast.gradle.docker-compose") version "0.14.0" + id("com.github.kt3k.coveralls") version "2.8.4" } application { @@ -197,6 +198,10 @@ tasks.test { finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run } +coveralls { + sourceDirs.add("src/main/kotlin") +} + tasks.register("testAll") { group = "verification" dependsOn(testSql)