File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 2929
3030 - name : Install dependencies
3131 run : |
32- pip install -e ".[tests]"
32+ pip install -e ".[tests]" setuptools_scm
3333
3434 - name : Tests
3535 run : pytest --cov --cov-report=xml
4747 echo "SOURCE_REPOSITORY=${SOURCE_REPOSITORY}" >> sonar_env
4848 echo "SOURCE_BRANCH=${SOURCE_BRANCH}" >> sonar_env
4949 echo "TARGET_BRANCH=${TARGET_BRANCH}" >> sonar_env
50+ echo "PROJECT_VERSION=$(python -m setuptools_scm)" >> sonar_env
5051 cat sonar_env
5152
5253 # upload coverage report for sonar workflow
Original file line number Diff line number Diff line change 9090 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9191 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
9292 SONAR_HOST_URL : https://sonar-ctao.zeuthen.desy.de
93+ with :
94+ args : >
95+ -Dsonar.projectVersion=${{ env.PROJECT_VERSION }}
9396
9497 - name : Sonarqube Scan PR
9598 if : github.event.workflow_run.event == 'pull_request'
@@ -100,6 +103,7 @@ jobs:
100103 SONAR_HOST_URL : https://sonar-ctao.zeuthen.desy.de
101104 with :
102105 args : >
106+ -Dsonar.projectVersion=${{ env.PROJECT_VERSION }}
103107 -Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }}
104108 -Dsonar.pullrequest.key=${{ env.PR_NUMBER }}
105109 -Dsonar.pullrequest.branch=${{ env.SOURCE_BRANCH }}
You can’t perform that action at this time.
0 commit comments