Skip to content

Create issue templates #36

Create issue templates

Create issue templates #36

Workflow file for this run

name: Measure Coverage
on:
pull_request:
jobs:
measure_coverage:
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
uses: reactivecircus/android-emulator-runner@v2
with:
arch: 'x86_64'
api-level: 30
script: ./gradlew jacocoTestReport
- name: Upload Report
uses: 'actions/upload-artifact@v2'
with:
name: report.xml
path: ${{ github.workspace }}/Hoodies-Network/build/reports/coverage/androidTest/debug/report.xml
- name: Jacoco Report to PR
id: jacoco
uses: madrapps/[email protected]
with:
path: ${{ github.workspace }}/Hoodies-Network/build/reports/coverage/androidTest/debug/report.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 0
debug-mode: false
update-comment: true
title: Test Coverage Report
- name: Get the Coverage info
run: |
echo "Total coverage ${{ steps.jacoco.outputs.coverage-overall }}"
- name: Fail PR if overall coverage is less than 80%
if: ${{ steps.jacoco.outputs.coverage-overall < 80.0 }}
uses: actions/github-script@v6
with:
script: |
core.setFailed('Overall coverage is less than 80%!')