Skip to content

Commit

Permalink
Address requested changes:
Browse files Browse the repository at this point in the history
- Add jacoco test coverage reports generation
- Only perform spotless check
  • Loading branch information
lincmba committed Nov 7, 2023
1 parent 1c93581 commit 1977d5f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
distribution: 'temurin'
java-version: 11

- name: Run Unit tests
run: ./gradlew test
- name: Run Unit Tests and Generate Coverage Report
run: ./gradlew test jacocoTestReport
working-directory: efsity

run-spotless-check:
Expand All @@ -37,5 +37,5 @@ jobs:
java-version: 11

- name: Run spotless check
run: ./gradlew spotlessApply
run: ./gradlew spotlessCheck
working-directory: efsity
10 changes: 9 additions & 1 deletion efsity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,12 @@ To run some tests
./gradlew test --test <fully qualified name glob>
#example
./gradlew test --test com.example.TestClassName.testMethodName
```
```

To run tests and generate a coverage report:

```console
./gradlew test jacocoTestReport
```

A report will be generated at `$buildDir/reports/jacoco/test`
3 changes: 3 additions & 0 deletions efsity/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
id("maven-publish")
alias(deps.plugins.spotless.maven.plugin)
alias(deps.plugins.buildConfig.constants.plugin)
id("jacoco")
}

repositories {
Expand Down Expand Up @@ -131,3 +132,5 @@ tasks.assemble {
}

application { mainClass.set("org.smartregister.Main") }

jacoco { toolVersion = "0.8.7" }

0 comments on commit 1977d5f

Please sign in to comment.