-
-
Notifications
You must be signed in to change notification settings - Fork 86
35 lines (32 loc) · 1.03 KB
/
Copy pathpr-test-coverage.yml
File metadata and controls
35 lines (32 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Report PR Test Coverage
on:
workflow_run:
workflows:
- Maven CI
types:
- completed
permissions: { }
jobs:
publish:
name: Report Coverage
runs-on: ubuntu-latest
if: |-
github.event.workflow_run.event == 'pull_request'
&& github.event.workflow_run.conclusion == 'success'
steps:
- name: Download PR test coverage report
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # tag=v8.0.1
with:
name: pr-test-coverage-report-java-25
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- name: Report Coverage to Codacy
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
run: |-
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
--project-token "${CODACY_PROJECT_TOKEN}" \
--commit-uuid "${COMMIT_SHA}" \
--coverage-reports ./jacoco.xml \
--language Java