Coverage report by Jacoco #29
This file contains 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
name: Android CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
# runs-on: ubuntu-latest | |
runs-on: self-hosted | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Build and run tests | |
run: ./gradlew build test | |
- name: Generate coverage report | |
run: ./gradlew jacocoTestReport | |
- name: Add coverage to PR | |
id: jacoco | |
uses: takumi-saito/jacoco-report@v1.7 | |
with: | |
paths: ${{ github.workspace }}/app/build/reports/jacocoTestReport/jacocoTestReport.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
min-coverage-overall: 40 | |
min-coverage-changed-files: 60 | |
merge-block: false | |
debug-mode: true |