Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .harness/orgs/codecov/projects/codecov/pipelines/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
pipeline:
name: Build example-python
identifier: Build_codecov_example_python_1782243281624
projectIdentifier: codecov
orgIdentifier: codecov
stages:
- stage:
name: Build
identifier: Build
type: CI
spec:
cloneCodebase: true
execution:
steps:
- step:
type: Run
name: Install dependencies
identifier: Install_dependencies
spec:
shell: Sh
command: |-
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install codecov-cli
- step:
type: Run
name: Run tests and collect coverage
identifier: Run_tests_and_collect_coverage
spec:
shell: Sh
command: pytest --cov app --cov-report=lcov:lcov.info
- step:
type: Run
name: Upload coverage to Harness
identifier: Upload_coverage_to_Harness
spec:
shell: Sh
command: hcli cov upload --file=lcov.info
envVariables:
CI_ENABLE_HCLI_FOR_TESTS: "true"
- step:
type: Run
name: Upload coverage to Codecov -- arg token
identifier: Upload_coverage_to_Codecov_arg_token
spec:
shell: Sh
command: codecovcli --verbose do-upload -t ${CODECOV_TOKEN} --fail-on-error
envVariables:
CODECOV_TOKEN: <+secrets.getValue("CODECOV_TOKEN")>
- step:
type: Run
name: Upload coverage to Codecov -- env token
identifier: Upload_coverage_to_Codecov_env_token
spec:
shell: Sh
command: codecovcli --verbose do-upload --fail-on-error
envVariables:
CODECOV_TOKEN: <+secrets.getValue("CODECOV_TOKEN")>
platform:
os: Linux
arch: Amd64
runtime:
type: Cloud
spec: {}
failureStrategies:
- onFailure:
errors:
- AllErrors
action:
type: MarkAsFailure
properties:
ci:
codebase:
connectorRef: codecov
repoName: example-python
build: <+input>
Loading