Skip to content

Commit a7275b3

Browse files
committed
Fixed up sonar and added report
Signed-off-by: Aloys Baillet <aloys.baillet+github@gmail.com>
1 parent b0abbfd commit a7275b3

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

.github/workflows/python-sonar.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ jobs:
4242
- name: Run prospector linter
4343
run: pipenv run prospector -F python/aswfdocker --output-format xunit > test-prospector-results.xml
4444

45+
- name: Publish Unit Test Results
46+
uses: EnricoMi/publish-unit-test-result-action@v1.3
47+
if: always()
48+
with:
49+
github_token: ${{ secrets.GITHUB_TOKEN }}
50+
check_name: Unit Test Results
51+
files: "**/*.xml"
52+
53+
- name: Prepare sonar variables
54+
run: |
55+
echo "::set-env name=SONAR_PROJECT_VERSION::`git log $tag -n 1 --date=short --pretty=\"%ad\"`"
56+
echo "::set-env name=SONAR_PROJECT_DATE::`pipenv run python setup.py --version`"
57+
4558
- name: SonarCloud Scan
4659
uses: sonarsource/sonarcloud-github-action@master
4760
if: always()
@@ -50,10 +63,5 @@ jobs:
5063
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5164
with:
5265
args: >
53-
-Dsonar.organization=academysoftwarefoundation
54-
-Dsonar.projectKey=AcademySoftwareFoundation_aswf_docker
55-
-Dsonar.sources=.
56-
-Dsonar.host.url=https://sonarcloud.io
57-
-Dsonar.login=$SONAR_TOKEN
58-
-Dsonar.projectDate=`git log $tag -n 1 --date=short --pretty="%ad"`
59-
-Dsonar.projectVersion=`pipenv run python setup.py --version`
66+
-Dsonar.projectDate=${{env.SONAR_PROJECT_VERSION}
67+
-Dsonar.projectVersion=${{env.SONAR_PROJECT_DATE}

0 commit comments

Comments
 (0)