Primitive-Collections/.github/workflows/coverage.yml

30 lines
807 B
YAML
Raw Normal View History

2022-05-28 19:56:28 +02:00
name: Measure coverage
on:
push:
branches: [ master ]
jobs:
2022-05-28 20:32:15 +02:00
build:
runs-on: ubuntu-latest
2022-05-28 19:56:28 +02:00
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Run Coverage
run: |
chmod +x gradlew
./gradlew build jacocoTestCoverage
2022-05-28 20:32:15 +02:00
- name: Upload Report
uses: 'actions/upload-artifact@v2'
with:
name: report.xml
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
2022-05-28 19:56:28 +02:00
- name: Add coverage to PR
id: jacoco
uses: madrapps/jacoco-report@v1.2
with:
2022-05-28 20:11:00 +02:00
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
2022-05-28 19:56:28 +02:00
token: ${{ secrets.GITHUB_TOKEN }}