Skip to content

Commit 39ae9b5

Browse files
Harness (#350)
* Create pipeline Build example-python * Update pipeline Build example-python * Update pipeline Build example-python * Update pipeline Build example-python * Update pipeline Build example-python * Update pipeline Build example-python * Update pipeline Build example-python * Update pipeline Build example-python
1 parent d9d3970 commit 39ae9b5

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

  • .harness/orgs/codecov/projects/codecov/pipelines
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
pipeline:
2+
name: Build example-python
3+
identifier: Build_codecov_example_python_1782243281624
4+
projectIdentifier: codecov
5+
orgIdentifier: codecov
6+
stages:
7+
- stage:
8+
name: Build
9+
identifier: Build
10+
type: CI
11+
spec:
12+
cloneCodebase: true
13+
execution:
14+
steps:
15+
- step:
16+
type: Run
17+
name: Install dependencies
18+
identifier: Install_dependencies
19+
spec:
20+
shell: Sh
21+
command: |-
22+
python -m pip install --upgrade pip
23+
pip install -r requirements.txt
24+
pip install codecov-cli
25+
- step:
26+
type: Run
27+
name: Run tests and collect coverage
28+
identifier: Run_tests_and_collect_coverage
29+
spec:
30+
shell: Sh
31+
command: pytest --cov app --cov-report=lcov:lcov.info
32+
- step:
33+
type: Run
34+
name: Upload coverage to Harness
35+
identifier: Upload_coverage_to_Harness
36+
spec:
37+
shell: Sh
38+
command: hcli cov upload --file=lcov.info
39+
envVariables:
40+
CI_ENABLE_HCLI_FOR_TESTS: "true"
41+
- step:
42+
type: Run
43+
name: Upload coverage to Codecov -- arg token
44+
identifier: Upload_coverage_to_Codecov_arg_token
45+
spec:
46+
shell: Sh
47+
command: codecovcli --verbose do-upload -t ${CODECOV_TOKEN} --fail-on-error
48+
envVariables:
49+
CODECOV_TOKEN: <+secrets.getValue("CODECOV_TOKEN")>
50+
- step:
51+
type: Run
52+
name: Upload coverage to Codecov -- env token
53+
identifier: Upload_coverage_to_Codecov_env_token
54+
spec:
55+
shell: Sh
56+
command: codecovcli --verbose do-upload --fail-on-error
57+
envVariables:
58+
CODECOV_TOKEN: <+secrets.getValue("CODECOV_TOKEN")>
59+
platform:
60+
os: Linux
61+
arch: Amd64
62+
runtime:
63+
type: Cloud
64+
spec: {}
65+
failureStrategies:
66+
- onFailure:
67+
errors:
68+
- AllErrors
69+
action:
70+
type: MarkAsFailure
71+
properties:
72+
ci:
73+
codebase:
74+
connectorRef: codecov
75+
repoName: example-python
76+
build: <+input>

0 commit comments

Comments
 (0)