@@ -14,18 +14,50 @@ pipeline:
1414 steps :
1515 - step :
1616 type : Run
17- name : Run
17+ name : Install dependencies
1818 identifier : Echo_Welcome_Message
1919 spec :
2020 shell : Sh
2121 command : |-
22+ python -m pip install --upgrade pip
23+ pip install -r requirements.txt
2224 pip install codecov-cli
23- pip install pytest pytest-cov
24- pytest --cov=. --cov-report=xml
25- env | grep -E "DRONE_|HARNESS_|CI"
26- codecovcli upload-process
2725 envVariables :
2826 CODECOV_TOKEN : <+secrets.getValue("Codecov_Upload_Token")>
27+ - step :
28+ type : Run
29+ name : Run tests and collect coverage
30+ identifier : Run_tests_and_collect_coverage
31+ spec :
32+ shell : Sh
33+ command : pytest --cov app --cov-report=lcov:lcov.info
34+ - step :
35+ type : Run
36+ name : Upload coverage to Harness
37+ identifier : Upload_coverage_to_Harness
38+ spec :
39+ shell : Sh
40+ command : hcli cov upload --file=lcov.info
41+ envVariables :
42+ CI_ENABLE_HCLI_FOR_TESTS : " true"
43+ - step :
44+ type : Run
45+ name : Upload coverage to Codecov -- arg token
46+ identifier : Upload_coverage_to_Codecov_arg_token
47+ spec :
48+ shell : Sh
49+ command : codecovcli --verbose do-upload -t ${CODECOV_TOKEN} --fail-on-error
50+ envVariables :
51+ CODECOV_TOKEN : <+secrets.getValue("CODECOV_TOKEN")>
52+ - step :
53+ type : Run
54+ name : Upload coverage to Codecov -- env token
55+ identifier : Upload_coverage_to_Codecov_env_token
56+ spec :
57+ shell : Sh
58+ command : codecovcli --verbose do-upload --fail-on-error
59+ envVariables :
60+ CODECOV_TOKEN : <+secrets.getValue("CODECOV_TOKEN")>
2961 platform :
3062 os : Linux
3163 arch : Amd64
0 commit comments