Files
gha-workflows/.github/workflows/ci-python-poetry.yml
Renovate [BOT] cdc2daf1d1 chore(deps): update sonarsource/sonarqube-scan-action action to v5.3.1 (#31)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [SonarSource/sonarqube-scan-action](https://github.com/SonarSource/sonarqube-scan-action) | action | patch | `v5.3.0` -> `v5.3.1` |

---

### Release Notes

<details>
<summary>SonarSource/sonarqube-scan-action (SonarSource/sonarqube-scan-action)</summary>

### [`v5.3.1`](https://github.com/SonarSource/sonarqube-scan-action/releases/tag/v5.3.1)

[Compare Source](https://github.com/SonarSource/sonarqube-scan-action/compare/v5.3.0...v5.3.1)

##### What's Changed

- Fix the scanner-update script by [@&#8203;henryju](https://github.com/henryju) in [#&#8203;194](https://github.com/SonarSource/sonarqube-scan-action/pull/194)
- SQSCANGHA-100 NO-JIRA Bump actions/checkout from 4 to 5 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;197](https://github.com/SonarSource/sonarqube-scan-action/pull/197)
- SQSCANGHA-101 Add more input injection tests by [@&#8203;aleksandra-bozhinoska-sonarsource](https://github.com/aleksandra-bozhinoska-sonarsource) in [#&#8203;200](https://github.com/SonarSource/sonarqube-scan-action/pull/200)
- pin actions/cache to a full-length commit SHA by [@&#8203;daantimmer](https://github.com/daantimmer) in [#&#8203;199](https://github.com/SonarSource/sonarqube-scan-action/pull/199)

##### New Contributors

- [@&#8203;daantimmer](https://github.com/daantimmer) made their first contribution in [#&#8203;199](https://github.com/SonarSource/sonarqube-scan-action/pull/199)

**Full Changelog**: <https://github.com/SonarSource/sonarqube-scan-action/compare/v5...v5.3.1>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS44OC4yIiwidXBkYXRlZEluVmVyIjoiNDEuODguMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9kZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: #31
Co-authored-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
Co-committed-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
2025-08-29 20:18:29 +02:00

59 lines
1.9 KiB
YAML

name: Python w/ Poetry CI
on:
workflow_call:
inputs:
python-version:
type: string
default: "3.11"
description: "Version of Python to use for testing environment"
secrets:
SONAR_TOKEN:
required: true
SNYK_TOKEN:
required: true
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Set python-version
id: python-version
run: |
PYTHON_VERSION=${{ inputs.python-version }}
echo "value=${PYTHON_VERSION:-"3.11"}" >> $GITHUB_OUTPUT
- name: Check out repository code
uses: actions/checkout@v4.3.0
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "${{ steps.python-version.outputs.value }}"
- name: Setup Poetry
uses: abatilo/actions-poetry@v4
- name: Install dependencies
run: poetry install
- name: Lint
run: poetry run pylint --fail-under=8 --recursive=yes --output-format=parseable --output=lintreport.txt .
- name: Unit Test
run: |
poetry run coverage run -m pytest -v --junitxml=testresults.xml
poetry run coverage xml
sed -i 's@${{ github.workspace }}@/github/workspace@g' coverage.xml
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v5.3.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Snyk Vulnerability Scan
uses: snyk/actions/python-3.10@master
continue-on-error: true # To make sure that SARIF upload gets called
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --sarif-file-output=snyk.sarif --all-projects
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk.sarif