fix(ci): install Poetry globally
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:11:47 +00:00
parent 8a66880eb4
commit 30c3672979
Signed by: luke
SSH Key Fingerprint: SHA256:D34npKT7UaiT/7gULqu7EPSLWWVAjTjXf4kKfJ/fQBo

View File

@ -27,22 +27,19 @@ jobs:
format: sonarqube format: sonarqube
no-fail: true no-fail: true
- name: Ensure pipx is in PATH # - name: Ensure pipx is in PATH
run: | # run: |
pipx ensurepath # pipx ensurepath
export PATH=$PATH:/root/.local/bin # export PATH=$PATH:/root/.local/bin
- name: Setup Poetry
uses: abatilo/actions-poetry@v4
# - name: Setup Poetry # - name: Setup Poetry
# run: | # uses: abatilo/actions-poetry@v4
# pipx install poetry
# echo $PIPX_BIN_DIR >> $GITEA_PATH - name: Setup Poetry
run: pipx install --global poetry
- name: Setup virtual environment - name: Setup virtual environment
run: | run: |
source $HOME/.profile
poetry config virtualenvs.create true --local poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local poetry config virtualenvs.in-project true --local
@ -53,20 +50,16 @@ jobs:
cache: 'poetry' cache: 'poetry'
- name: Install dependencies - name: Install dependencies
run: | run: poetry install
source $HOME/.profile
poetry install
- name: Unit Test - name: Unit Test
run: | run: |
source $HOME/.profile
poetry run coverage run -m pytest -v --junitxml=testresults.xml poetry run coverage run -m pytest -v --junitxml=testresults.xml
poetry run coverage xml poetry run coverage xml
sed -i 's@${{ gitea.workspace }}@/github/workspace@g' coverage.xml sed -i 's@${{ gitea.workspace }}@/github/workspace@g' coverage.xml
- name: Lint - name: Lint
run: | run: |
source $HOME/.profile
poetry run pylint --fail-under=8 --recursive=yes --output-format=parseable --output=lintreport.txt . poetry run pylint --fail-under=8 --recursive=yes --output-format=parseable --output=lintreport.txt .
cat lintreport.txt cat lintreport.txt