Skip to content

Release/0.4.0

Release/0.4.0 #72

Workflow file for this run

name: Pull Request
on:
pull_request:
branches:
- '*'
jobs:
build-and-test:
uses: ./.github/workflows/base-ci.yml
delta-coverage-check:
needs: build-and-test
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
checks: write
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: true
cache-write-only: false
- name: Pull tests artifacts
uses: actions/download-artifact@master
with:
name: tests-artifacts
path: tests-artifacts
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run delta coverage check
continue-on-error: ${{ contains(github.event.pull_request.labels.*.name, 'ignore-diff-coverage') }}
run: ./gradlew deltaCoverage -Pgithub -PdiffBase="refs/remotes/origin/$GITHUB_BASE_REF" --parallel
- name: Append Delta Coverage Summary
if: ${{ github.event_name == 'pull_request' && ( success() || failure() ) }}
continue-on-error: true
run: |
cat build/reports/coverage-reports/delta-coverage/report.md >> $GITHUB_STEP_SUMMARY
echo '---' >> $GITHUB_STEP_SUMMARY
- name: Add test results to PR
uses: EnricoMi/publish-unit-test-result-action@v2.16.1
if: ${{ github.event_name == 'pull_request' && ( success() || failure() ) }}
continue-on-error: true
with:
files:
'tests-artifacts/**/test-results/*/TEST-*.xml'
- name: Add Delta Coverage report to PR
id: coverage-in-PR
if: ${{ github.event_name == 'pull_request' && ( success() || failure() ) }}
uses: madrapps/jacoco-report@v1.6.1
continue-on-error: true
with:
token: ${{ secrets.GITHUB_TOKEN }}
paths:
'build/reports/coverage-reports/delta-coverage/report.xml'