diff --git a/.github/actions/config-poetry/action.yml b/.github/actions/config-poetry/action.yml index c2cc8811..e379a430 100644 --- a/.github/actions/config-poetry/action.yml +++ b/.github/actions/config-poetry/action.yml @@ -13,7 +13,8 @@ inputs: description: The version of jFrog to install default: 2.77.0 poetry-virtualenvs-path: - description: Path to the Poetry virtual environments, relative to GitHub workspace. The folder is cached only if it is a subdirectory of + description: + Path to the Poetry virtual environments, relative to GitHub workspace. The folder is cached only if it is a subdirectory of `poetry-cache-dir`. default: .cache/pypoetry/virtualenvs poetry-cache-dir: @@ -41,16 +42,22 @@ runs: path: ${{ inputs.poetry-cache-dir }} key: poetry-${{ runner.os }}-${{ hashFiles('poetry.lock') }} restore-keys: poetry-${{ runner.os }}- - - name: Install mise and Python + + # python needs to be installed before jfrog and poetry + # (see https://xtranet-sonarsource.atlassian.net/wiki/spaces/Platform/pages/4344217683/Mise+Poetry+Install+-+GitHub) + - name: Install mise and python uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0 with: version: 2025.7.12 - install_args: "python@${{ inputs.python-version }}" + tool_versions: | + python ${{ inputs.python-version }} + - name: Install jfrog and poetry through mise uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0 with: version: 2025.7.12 experimental: true # needed to use the http backend for installation of jfrog on windows + - name: Vault # yamllint disable rule:line-length id: secrets @@ -72,4 +79,3 @@ runs: echo "POETRY_VIRTUALENVS_PATH=${POETRY_VIRTUALENVS_PATH}" >> "$GITHUB_ENV" echo "POETRY_CACHE_DIR=${POETRY_CACHE_DIR}" >> "$GITHUB_ENV" ${GITHUB_ACTION_PATH}/config-poetry.sh - diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 87497753..a7c05e8f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: id: build-poetry with: sonar-platform: none - artifactory-reader-role: private-reader + artifactory-reader-role: private-reader artifactory-deployer-role: qa-deployer deploy-pull-request: true @@ -41,7 +41,7 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - - name: Configure poetry + - name: Configure poetry uses: ./.github/actions/config-poetry # We use this job to cache the poetry depend - run: | poetry install @@ -135,8 +135,10 @@ jobs: id-token: write contents: write strategy: + fail-fast: false matrix: - python-version: ["3.9.18", "3.9.6", "3.10.13", "3.11.7", "3.12.1", "3.13.2"] + python-version: + ["3.9.18", "3.9.6", "3.10.13", "3.11.7", "3.12.1", "3.13.2", "3.14.0"] steps: - name: Checkout repository uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 @@ -189,14 +191,24 @@ jobs: if [ ! -f sonarqube_cache/sonarqube.zip ]; then wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-$SONARQUBE_VERSION.zip -O sonarqube_cache/sonarqube.zip fi - - name: Configure poetry + - name: Configure poetry uses: ./.github/actions/config-poetry - name: Execute the integration tests run: ./.github/scripts/run_its.sh promote: name: "Promote" - needs: [build, formatting, documentation, coverage, analysis, qa, qa-windows, its] + needs: + [ + build, + formatting, + documentation, + coverage, + analysis, + qa, + qa-windows, + its, + ] runs-on: github-ubuntu-latest-s permissions: id-token: write diff --git a/src/pysonar_scanner/configuration/cli.py b/src/pysonar_scanner/configuration/cli.py index 8c0de09f..1ddaa280 100644 --- a/src/pysonar_scanner/configuration/cli.py +++ b/src/pysonar_scanner/configuration/cli.py @@ -174,7 +174,6 @@ def __create_parser(cls): "--sonar-python-analysis-parallel", "--analysis-in-parallel", "-Dsonar.python.analysis.parallel", - type=bool, action=argparse.BooleanOptionalAction, help="When set to False the analysis will be single threaded", ) @@ -284,7 +283,6 @@ def __create_parser(cls): ) scanner_behavior_group.add_argument( "--sonar-scm-exclusions-disabled", - type=bool, action=argparse.BooleanOptionalAction, help="Defines whether files ignored by the SCM, e.g., files listed in .gitignore, will be excluded from the analysis or not", ) @@ -324,7 +322,6 @@ def __create_parser(cls): ) scanner_behavior_group.add_argument( "--sonar-qualitygate-wait", - type=bool, action=argparse.BooleanOptionalAction, help="Forces the analysis step to poll the server instance and wait for the Quality Gate status", ) @@ -353,7 +350,6 @@ def __create_parser(cls): ) scanner_behavior_group.add_argument( "--sonar-scm-force-reload-all", - type=bool, action=argparse.BooleanOptionalAction, help="Set this property to true to load blame information for all files, which may significantly increase analysis duration", ) @@ -364,7 +360,6 @@ def __create_parser(cls): ) scanner_behavior_group.add_argument( "--sonar-python-skip-unchanged", - type=bool, action=argparse.BooleanOptionalAction, help="Override the SonarQube configuration of skipping or not the analysis of unchanged Python files", ) @@ -511,7 +506,6 @@ def __create_parser(cls): reports_group.add_argument( "--sonar-python-xunit-skip-details", "--xunit-skip-details", - type=bool, action=argparse.BooleanOptionalAction, help="When enabled, the test execution statistics is provided only on project level", )