Skip to content

Commit

Permalink
CI(deps): Update dependency flake8 to v7 and use pipx to isolate tools (
Browse files Browse the repository at this point in the history
#3818)

* CI(deps): Update dependency flake8 to v7

* Use pipx to install Python packages

* Move pytest-github-actions-annotate-failures install near pytest install

* Use Python 3.10 and add toml and sarif extra to bandit install

* Inject other python packages into pylint's pipx environment

* Inject pytest dependencies in pylint pipx env

* Include app pytest into pylint's pipx env

* Split pytest-pylint pipx inject to not fail on no installable apps for pytest plugins

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>
  • Loading branch information
renovate[bot] and echoix committed Jun 19, 2024
1 parent 75cd34a commit 247a405
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# renovate: datasource=pypi depName=black
BLACK_VERSION: "24.4.2"
# renovate: datasource=pypi depName=flake8
FLAKE8_VERSION: "5.0.4"
FLAKE8_VERSION: "7.1.0"
# renovate: datasource=pypi depName=pylint
PYLINT_VERSION: "2.12.2"
# renovate: datasource=pypi depName=bandit
Expand Down Expand Up @@ -87,9 +87,13 @@ jobs:
run: |
pip install -r .github/workflows/python_requirements.txt
pip install -r .github/workflows/optional_requirements.txt
pip install flake8==${{ env.FLAKE8_VERSION }}
pip install pylint==${{ env.PYLINT_VERSION }} pytest-github-actions-annotate-failures
pip install bandit[sarif]==${{ env.BANDIT_VERSION }}
pip install --user pipx
pipx ensurepath
pipx install flake8==${{ env.FLAKE8_VERSION }}
pipx install pylint==${{ env.PYLINT_VERSION }}
pipx inject pylint -r .github/workflows/python_requirements.txt -r .github/workflows/optional_requirements.txt
# The extra toml is only needed before Python 3.11
pipx install bandit[sarif,toml]==${{ env.BANDIT_VERSION }}
- name: Run Flake8
run: |
Expand Down Expand Up @@ -146,7 +150,8 @@ jobs:
- name: Run Pylint on other files using pytest
run: |
pip install pytest==7.4.4 pytest-pylint==0.19
pipx inject --include-apps pylint pytest==7.4.4
pipx inject pylint pytest-pylint==0.19 pytest-github-actions-annotate-failures
echo "::warning file=.github/workflows/python-code-quality.yml,line=149,col=42,endColumn=48::\
Temporarily downgraded pytest-pylint and pytest to allow merging other PRs.\
The errors reported with a newer version seem legitimite and should be fixed \
Expand Down

0 comments on commit 247a405

Please sign in to comment.