@@ -22,6 +22,7 @@ pipeline {
2222 pip3 install -e .
2323 '''
2424 }
25+
2526 }
2627 }
2728 }
@@ -30,6 +31,14 @@ pipeline {
3031 stage(' Test' ) {
3132 environment {
3233 CODECOV_TOKEN = credentials(' scilpy-codecov-token' )
34+ CODECOV_GIT_COMMIT = """ ${ sh(
35+ returnStdout: true,
36+ script: 'git rev-parse $GIT_BRANCH'
37+ ).trim()} """
38+ CODECOV_PARENT_COMMIT = """ ${ sh(
39+ returnStdout: true,
40+ script: 'git merge-base origin/master $GIT_BRANCH'
41+ ).trim()} """
3342 }
3443 steps {
3544 withPythonEnv(' CPython-3.10' ) {
@@ -45,11 +54,6 @@ pipeline {
4554 '''
4655 }
4756 discoverGitReferenceBuild()
48- recordCoverage(
49- name : ' Scilpy Coverage Report' ,
50- sourceCodeRetention : ' MODIFIED' ,
51- tools : [[parser : ' COBERTURA' ,
52- pattern : ' **/.test_reports/coverage.xml' ]])
5357 sh '''
5458 curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --import # One-time step
5559 curl -Os https://uploader.codecov.io/latest/linux/codecov
@@ -60,7 +64,10 @@ pipeline {
6064 shasum -a 256 -c codecov.SHA256SUM
6165
6266 chmod +x codecov
63- ./codecov -t ${CODECOV_TOKEN} -f .test_reports/coverage.xml
67+ ./codecov -v -t ${CODECOV_TOKEN} \
68+ -f .test_reports/coverage.xml \
69+ -C ${CODECOV_GIT_COMMIT} \
70+ -N ${CODECOV_PARENT_COMMIT}
6471 '''
6572 }
6673 }
0 commit comments