Skip to content

Commit ca274e0

Browse files
clean: Orb command simplified
1 parent 5e6184d commit ca274e0

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

.circleci/config.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff 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

orbs/jobs/send_report.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,21 @@ description: "Runs codacy-coverage-reporter on a tool"
33
executor: machine
44

55
parameters:
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

1511
steps:
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

0 commit comments

Comments
 (0)