Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(auth): added kover plugin for coverage #2267

Merged
merged 25 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a3c127a
added kotlinx plugin to auth build file
Jan 17, 2023
7b8fd6e
Merge branch 'main' into feature/fix-test-coverage
gpanshu Feb 1, 2023
f820150
Merge branch 'main' into feature/fix-test-coverage
gpanshu Feb 1, 2023
33833fc
add kover report to library plugins
Feb 1, 2023
d3ec699
Merge remote-tracking branch 'origin/feature/fix-test-coverage' into …
Feb 1, 2023
0774f25
Merge branch 'main' into feature/fix-test-coverage
banji180 Feb 1, 2023
8ae96de
added kover to project
Feb 2, 2023
92ddf55
Merge remote-tracking branch 'origin/feature/fix-test-coverage' into …
Feb 2, 2023
fddac90
added kover to project
Feb 2, 2023
ed313ad
Merge remote-tracking branch 'origin/main' into feature/fix-test-cove…
Feb 2, 2023
e7b4573
added kover plugin to gradle file
Feb 2, 2023
c2dc7e3
added kover plugin to gradle file
Feb 2, 2023
99f3a6d
fixed lint issue
Feb 6, 2023
dfd7264
fixed review comments
Feb 6, 2023
e2db09a
fixed review comments
Feb 6, 2023
99608e3
fixed review comments
Feb 6, 2023
8103c55
fixed review comments
Feb 7, 2023
4f25dd1
fixed review comments
Feb 7, 2023
94812bb
Merge branch 'main' into feature/fix-test-coverage
banji180 Feb 7, 2023
f58a615
fixed review comments
Feb 8, 2023
9cd8e91
added exclude package to kover
Feb 8, 2023
d0f2b31
Merge branch 'main' into feature/fix-test-coverage
banji180 Feb 8, 2023
aaee3cf
added exclude package to kover
Feb 9, 2023
3a0c2f3
Merge remote-tracking branch 'origin/feature/fix-test-coverage' into …
Feb 9, 2023
f8c637a
Merge branch 'main' into feature/fix-test-coverage
banji180 Feb 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/codecov_code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
java-version: '11'
distribution: 'corretto'

- name: Run test and generate jacoco report
run: ./gradlew jacocoTestReport
- name: Run test and generate kover report
run: ./gradlew koverReport

- name: create temp directory
run: mkdir /home/runner/work/amplify-android/amplify-android/code-coverage

- name: copy jacoco test report to temp directory
run: cp -r /home/runner/work/amplify-android/amplify-android/**/build/coverage-report/*.xml /home/runner/work/amplify-android/amplify-android/code-coverage/
- name: copy kover test report to temp directory
run: cp -r /home/runner/work/amplify-android/amplify-android/**/build/reports/kover/xml/*.xml /home/runner/work/amplify-android/amplify-android/code-coverage/

- name: Upload Test Report
uses: codecov/codecov-action@v3
Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ buildscript {
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.7.10")
classpath("org.jlleitschuh.gradle:ktlint-gradle:11.0.0")
classpath("org.gradle:test-retry-gradle-plugin:1.4.1")
classpath("org.jetbrains.kotlinx:kover:0.6.1")
}
}

Expand Down Expand Up @@ -71,7 +72,7 @@ subprojects {

afterEvaluate {
configureAndroid()
apply(from = "../jacoco.gradle")
apply(from = "../kover.gradle")
}

if (!name.contains("test")) {
Expand Down
24 changes: 24 additions & 0 deletions kover.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apply from: '../jacoco-config.gradle'
banji180 marked this conversation as resolved.
Show resolved Hide resolved
apply plugin: 'kover'

kover{
instrumentation {
// exclude jdk internals from instrumentation
excludeTasks.add "jdk.internal.*"
}

xmlReport {
// set to true to run koverXmlReport task during the execution of the check task (if it exists) of the current project
onCheck.set false

// change report file name
reportFile.set layout.buildDirectory.file("reports/kover/xml/${project.name}.xml")
overrideFilters {
// override common class filter
classes {
// override class exclusion rules
excludes.addAll jacocoIgnoreList
}
}
}
}