feat(ci): use built-in caching in setup-python
Some checks failed
CI w/ Poetry and Docker / ci (pull_request) Failing after 12s

This commit is contained in:
Luke Tainton 2025-01-02 14:02:29 +00:00
parent 45856b94d3
commit c1f431bf8d
Signed by: luke
SSH Key Fingerprint: SHA256:D34npKT7UaiT/7gULqu7EPSLWWVAjTjXf4kKfJ/fQBo

View File

@ -31,6 +31,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "${{ vars.PYTHON_VERSION }}"
cache: 'poetry'
- name: Ensure pipx is in PATH
run: |
@ -51,24 +52,11 @@ jobs:
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v4.2.0
name: Define cache for dependencies
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
restore-keys: venv-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
source $HOME/.profile
poetry install
- name: Lint
run: |
source $HOME/.profile
poetry run pylint --fail-under=8 --recursive=yes --output-format=parseable --output=lintreport.txt .
cat lintreport.txt
- name: Unit Test
run: |
source $HOME/.profile
@ -76,6 +64,12 @@ jobs:
poetry run coverage xml
sed -i 's@${{ gitea.workspace }}@/github/workspace@g' coverage.xml
- name: Lint
run: |
source $HOME/.profile
poetry run pylint --fail-under=8 --recursive=yes --output-format=parseable --output=lintreport.txt .
cat lintreport.txt
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v4.2.1
env: