File tree 3 files changed +31
-8
lines changed
3 files changed +31
-8
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,17 @@ jobs:
22
22
steps :
23
23
- uses : actions/checkout@master
24
24
- name : Run codacy-coverage-reporter
25
- uses : mrfyda /codacy-coverage-reporter-action@master
25
+ uses : codacy /codacy-coverage-reporter-action@master
26
26
with :
27
27
project-token : ${{ secrets.CODACY_PROJECT_TOKEN }}
28
+ coverage-reports : cobertura.xml
28
29
` ` `
29
30
30
31
## Workflow options
31
32
32
33
Change these options in the workflow ` .yml` file to meet your GitHub project needs.
33
34
34
- | Setting | Description | Default value |
35
- | --------------- | ----------------------------------- | ------------------------------------- |
36
- | `project-token` | The project API token | `${{ secrets.CODACY_PROJECT_TOKEN }}` |
35
+ | Setting | Description | Default value |
36
+ | ------------------ | ------------------------------------------------ | ------------------------------------- |
37
+ | `project-token` | The project API token | `${{ secrets.CODACY_PROJECT_TOKEN }}` |
38
+ | `coverage-reports` | Optional Comma separated list of reports to send | `''` |
Original file line number Diff line number Diff line change 1
1
# action.yml
2
- name : " codacy-coverage-reporter "
3
- description : " Multi-language coverage reporter for Codacy"
2
+ name : ' Codacy Coverage Reporter '
3
+ description : ' Multi-language coverage reporter for Codacy'
4
4
branding :
5
5
icon : ' check'
6
6
color : ' gray-dark'
7
7
inputs :
8
8
project-token :
9
+ description : ' Project token for the Codacy project you want to send coverage information'
9
10
required : true
11
+ coverage-reports :
12
+ description : ' Optional comma separated list of coverage reports to send to Codacy'
13
+ required : false
14
+ default : ' '
10
15
runs :
11
16
using : ' docker'
12
17
image : ' Dockerfile'
13
18
args :
14
- - " ${{ inputs.project-token }}"
19
+ - ${{ inputs.project-token }}
20
+ - ${{ inputs.coverage-reports }}
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
export CODACY_PROJECT_TOKEN=$1
4
- bash <( curl -Ls https://coverage.codacy.com/get.sh)
4
+ # comma separated list of report files
5
+ report_list=$2
6
+
7
+ IFS=' ,'
8
+ report_array=$report_list
9
+ params=' '
10
+ for report in $report_array
11
+ do
12
+ if [ ! -z " $report " ]
13
+ then
14
+ params=" $params -r $report "
15
+ fi
16
+ done
17
+
18
+ bash <( curl -Ls https://coverage.codacy.com/get.sh) report $params --partial && \
19
+ bash <( curl -Ls https://coverage.codacy.com/get.sh) final
You can’t perform that action at this time.
0 commit comments