-
Notifications
You must be signed in to change notification settings - Fork 0
Add CodeCov #28
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
Merged
Merged
Add CodeCov #28
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
03b8c52
Provide code coverage verification.
Vladyslav-Kuksiuk d438238
Improve test coverage.
Vladyslav-Kuksiuk ebcd9da
Improve code coverage percent.
Vladyslav-Kuksiuk 4c0e188
Merge branch 'clean-up' into add-codecov
Vladyslav-Kuksiuk 8ec33a9
Improve coverage.
Vladyslav-Kuksiuk af1eee5
Improve test coverage.
Vladyslav-Kuksiuk b33862a
Improve coverage behavior.
Vladyslav-Kuksiuk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: Coverage | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| coverage: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
|
|
||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set Up Java 17 for Compatibility Tests | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
|
|
||
| - name: Save Java 17 Toolchain | ||
| run: echo "EMBED_CODE_JAVA_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Set Up Java 25 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 25 | ||
|
|
||
| - name: Set Up Gradle | ||
| uses: gradle/actions/setup-gradle@v6 | ||
|
|
||
| - name: Generate Test Coverage | ||
| run: >- | ||
| ./gradlew | ||
| -Dorg.gradle.java.installations.paths="$EMBED_CODE_JAVA_17_HOME" | ||
| --no-configuration-cache | ||
| :gradle-plugin:jacocoTestReport | ||
|
|
||
| - name: Upload Coverage | ||
| uses: codecov/codecov-action@v7 | ||
| with: | ||
| files: ./gradle-plugin/build/reports/jacoco/test/jacocoTestReport.xml | ||
| token: ${{ secrets.CODECOV_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| coverage: | ||
| status: | ||
| project: | ||
| default: | ||
| informational: true | ||
| patch: | ||
| default: | ||
| target: 90% | ||
| threshold: 0% | ||
| only_pulls: true | ||
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must fix — the patch target is not met by this PR itself.
codecov/patchon this head commit reports69.07% of diff hit (target 90.00%), so the check this file introduces is red on the very change that adds it, and it will stay red for anyone rebasing on it.Reproduced locally with
./gradlew --no-configuration-cache :gradle-plugin:jacocoTestReport. The uncovered new lines are all error-handling wrappers plus one synthetic overload:InstallationDirectory.kt66–69, 142–147, 182–185 — theIOException→GradleExceptionwrappers inprepare(),createDirectoriesSafely(), andisRedirectingFileSystemEntry().Checksum.kt191–192 — theIOExceptioncatch inreadChecksumMetadata.Checksum.kt152, 155 — the synthetic default-argument overload ofreadGitHubReleaseMetadata(see the separate comment there).Smallest correction: either cover the reachable ones (a read-only installation root exercises the
prepare()wrapper; a closed loopback socket exercises thereadChecksumMetadatacatch) and drop the default argument, or set a target this repository can actually sustain and raise it later. Merging a permanently failing status check is the outcome to avoid.