Skip to content

Commit e9de066

Browse files
committed
Update Python and SonarQube
Update Python modules and use SonarQube pre-defined action Signed-off-by: Jean-Francois Panisset <panisset@gmail.com>
1 parent ac344c4 commit e9de066

File tree

3 files changed

+44
-59
lines changed

3 files changed

+44
-59
lines changed

.github/workflows/python-sonar.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
14+
with:
15+
# Disabling shallow clones is recommended for improving the relevancy of reporting
16+
fetch-depth: 0
1417
- name: Set up Python
1518
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
1619
with:
@@ -33,21 +36,6 @@ jobs:
3336
run: git fetch --unshallow
3437

3538
- name: Install and Run Sonar Scanner
39+
uses: SonarSource/sonarqube-scan-action@a31c9398be7ace6bbfaf30c0bd5d415f843d45e9 # v7.0.0
3640
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3841
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
39-
run: |
40-
export SONAR_SCANNER_VERSION=5.0.1.3006
41-
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
42-
curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
43-
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
44-
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
45-
export SONAR_SCANNER_OPTS="-server"
46-
sonar-scanner \
47-
-Dsonar.organization=academysoftwarefoundation \
48-
-Dsonar.projectKey=AcademySoftwareFoundation_aswf-docker \
49-
-Dsonar.sources=. \
50-
-Dsonar.host.url=https://sonarcloud.io \
51-
-Dsonar.login=$SONAR_TOKEN \
52-
-Dsonar.projectDate=`git log $tag -n 1 --date=short --pretty="%ad"` \
53-
-Dsonar.projectVersion=`pipenv run python setup.py --version`

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pytest = "*"
88
atomicwrites = {version = "*", markers = "platform_system == 'Windows'"}
99
pytest-cov = "*"
1010
pylint = "==3.2.7"
11-
black = "==22.12"
11+
black = "*"
1212
mypy = "*"
1313
pre-commit = "*"
1414
pytest-pylint = "*"

Pipfile.lock

Lines changed: 39 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)