-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6740b5d
commit 53ebfe1
Showing
3 changed files
with
31 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
# action.yml | ||
name: "codacy-coverage-reporter" | ||
description: "Multi-language coverage reporter for Codacy" | ||
name: 'Codacy Coverage Reporter' | ||
description: 'Multi-language coverage reporter for Codacy' | ||
branding: | ||
icon: 'check' | ||
color: 'gray-dark' | ||
inputs: | ||
project-token: | ||
description: 'Project token for the Codacy project you want to send coverage information' | ||
required: true | ||
coverage-reports: | ||
description: 'Optional comma separated list of coverage reports to send to Codacy' | ||
required: false | ||
default: '' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- "${{ inputs.project-token }}" | ||
- ${{ inputs.project-token }} | ||
- ${{ inputs.coverage-reports }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
#!/bin/bash | ||
|
||
export CODACY_PROJECT_TOKEN=$1 | ||
bash <(curl -Ls https://coverage.codacy.com/get.sh) | ||
# comma separated list of report files | ||
report_list=$2 | ||
|
||
IFS=',' | ||
report_array=$report_list | ||
params='' | ||
for report in $report_array | ||
do | ||
if [ ! -z "$report" ] | ||
then | ||
params="$params -r $report" | ||
fi | ||
done | ||
|
||
bash <(curl -Ls https://coverage.codacy.com/get.sh) report $params --partial &&\ | ||
bash <(curl -Ls https://coverage.codacy.com/get.sh) final |