Files
gha-workflows/.gitea/workflows/ci-python.yml
renovate[bot] 7686cf60c7 chore(deps): update actions/checkout action to v5.0.1 (#45)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://github.com/actions/checkout) | action | patch | `v5.0.0` -> `v5.0.1` |

---

### Release Notes

<details>
<summary>actions/checkout (actions/checkout)</summary>

### [`v5.0.1`](https://github.com/actions/checkout/releases/tag/v5.0.1)

[Compare Source](https://github.com/actions/checkout/compare/v5.0.0...v5.0.1)

#### What's Changed

- Port v6 cleanup to v5 by [@&#8203;ericsciple](https://github.com/ericsciple) in [#&#8203;2301](https://github.com/actions/checkout/pull/2301)

**Full Changelog**: <https://github.com/actions/checkout/compare/v5...v5.0.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:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xMi4xIiwidXBkYXRlZEluVmVyIjoiNDIuMTIuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9kZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: #45
Co-authored-by: renovate[bot] <renovate-bot@git.tainton.uk>
Co-committed-by: renovate[bot] <renovate-bot@git.tainton.uk>
2025-11-17 19:21:54 +00:00

65 lines
1.7 KiB
YAML

name: Python 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: Check out repository code
uses: actions/checkout@v5.0.1
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "${{ inputs.python-version }}"
- name: Update Pip
run: pip install -U pip
- uses: actions/cache@v4
name: Define cache for dependencies
with:
path: .
key: venv-${{ hashFiles('requirements**.txt') }}
restore-keys: venv-${{ hashFiles('requirements**.txt') }}
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Lint
run: pylint --fail-under=8 --recursive=yes --output-format=parseable --output=lintreport.txt .
- name: Unit Test
run: |
coverage run -m pytest -v --junitxml=testresults.xml
coverage xml
sed -i 's@${{ github.workspace }}@/github/workspace@g' coverage.xml
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v6.0.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Snyk Vulnerability Scan
uses: snyk/actions/python@master
continue-on-error: true # Sometimes vulns aren't immediately fixable
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: test --all-projects