Skip to content

Commit 53ebfe1

Browse files
feat: build for release
1 parent 6740b5d commit 53ebfe1

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

Diff for: README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@master
2424
- name: Run codacy-coverage-reporter
25-
uses: mrfyda/codacy-coverage-reporter-action@master
25+
uses: codacy/codacy-coverage-reporter-action@master
2626
with:
2727
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
28+
coverage-reports: cobertura.xml
2829
```
2930
3031
## Workflow options
3132
3233
Change these options in the workflow `.yml` file to meet your GitHub project needs.
3334

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 | `''` |

Diff for: action.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
# 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'
44
branding:
55
icon: 'check'
66
color: 'gray-dark'
77
inputs:
88
project-token:
9+
description: 'Project token for the Codacy project you want to send coverage information'
910
required: true
11+
coverage-reports:
12+
description: 'Optional comma separated list of coverage reports to send to Codacy'
13+
required: false
14+
default: ''
1015
runs:
1116
using: 'docker'
1217
image: 'Dockerfile'
1318
args:
14-
- "${{ inputs.project-token }}"
19+
- ${{ inputs.project-token }}
20+
- ${{ inputs.coverage-reports }}

Diff for: entrypoint.sh

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
#!/bin/bash
22

33
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

0 commit comments

Comments
 (0)