I have added the coverage.yml file in the .github/workflows folder of my project. Here is the file:
name: Measure coverage
on:
push:
branches: [ develop ]
pull_request:
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Coverage
run: ./gradlew test
- name: Upload Report
uses: 'actions/upload-artifact@v2'
with:
name: report.xml
path: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
- name: Jacoco Report to PR
id: jacoco
uses: madrapps/jacoco-report@v1.1
with:
path: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
min-coverage-overall: 90
min-coverage-changed-files: 60
debug-mode: false
- name: Get the Coverage info
run: |
echo "Total coverage ${{ steps.jacoco.outputs.coverage-overall }}"
echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"
On creating a pull request on GitHub after adding this file I am getting this error on GitHub.
Run ./gradlew test
Downloading https://services.gradle.org/distributions/gradle-6.7.1-all.zip
.............10%..............20%..............30%..............40%..............50%..............60%..............70%..............80%..............90%..............100%
Welcome to Gradle 6.7.1!
Here are the highlights of this release:
- File system watching is ready for production use
- Declare the version of Java your build requires
- Java 15 support
For more details see https://docs.gradle.org/6.7.1/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :bootBuildInfo
> Task :checkApolloVersions
> Task :generateMainServiceApolloSources
> Task :checkMainServiceApolloDuplicates
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Execution failed for task ':compileJava'.
Use '--warning-mode all' to show the individual deprecation warnings.
Can someone help me to solve this issue, I am not able to figure out why it is happening. Is it happening because I have multiple JDKs installed in my mac?