File tree Expand file tree Collapse file tree 2 files changed +10
-20
lines changed
Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -131,10 +131,6 @@ workflows:
131131 - codacy/publish_ghr :
132132 name : publish_ghr
133133 path : ~/workdir/artifacts/
134- filters :
135- branches :
136- only :
137- - master
138134 context : CodacyGitHub
139135 requires :
140136 - publish
Original file line number Diff line number Diff line change @@ -3,27 +3,21 @@ description: "Runs codacy-coverage-reporter on a tool"
33executor : machine
44
55parameters :
6- coverage_version :
6+ tool_version :
77 type : string
88 default : latest
9- description : " Codacy coverage version"
10- project_token :
11- type : string
12- default : $CODACY_PROJECT_TOKEN
13- description : " Codacy's project token"
9+ description : " Specify Codacy's coverage reporter tool version"
1410
1511steps :
1612 - attach_workspace :
1713 at : ~/workdir
14+ - restore_cache :
15+ key : codacy-coverage-reporter-cache-$CODACY_COVERAGE_REPORTER_VERSION-<< parameters.tool_version >>
1816 - run :
1917 command : |
20- if [ -z ${CODACY_PROJECT_TOKEN+x} ]; then
21- echo "CODACY_PROJECT_TOKEN not found. Skipping send coverage to Codacy."
22- else
23- echo "Codacy project token: $CODACY_PROJECT_TOKEN"
24- echo "Codacy coverage reporter version: $CODACY_REPORTER_VERSION"
25- bash <(curl -Ls https://coverage.codacy.com/get.sh)
26- fi
27- environment :
28- CODACY_REPORTER_VERSION : << parameters.coverage_version >>
29- CODACY_PROJECT_TOKEN : << parameters.project_token >>
18+ export CODACY_REPORTER_VERSION=<< parameters.tool_version >>
19+ bash <(curl -Ls https://coverage.codacy.com/get.sh)
20+ - save_cache :
21+ key : codacy-coverage-reporter-cache-$CODACY_COVERAGE_REPORTER_VERSION-<< parameters.tool_version >>
22+ paths :
23+ - .codacy-coverage
You can’t perform that action at this time.
0 commit comments