Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,30 @@
TESTS_REPORTS_ARTIFACT: tests-reports

jobs:
pyupgrade:
name: test upgradable
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v4
- name: Setup Python Environment
# see https://github.com/actions/setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
architecture: 'x64'
- name: Install poetry
# see https://github.com/marketplace/actions/setup-poetry
uses: Gr1N/setup-poetry@v9
Comment thread Dismissed
with:
poetry-version: ${{ env.POETRY_VERSION }}
- name: Install dependencies
run: poetry install --no-root
- name: Run tox
run: poetry run tox run -e pyupgrade -s false

coding-standards:
name: Linting & CodingStandards
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ tomli = { version = "2.2.1", python = "<3.11" }
tox = "4.26.0"
xmldiff = "2.7.0"
bandit = "1.8.3"
pyupgrade = "3.20.0"

[tool.semantic_release]
# see https://python-semantic-release.readthedocs.io/en/latest/configuration.html
Expand Down
10 changes: 10 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,14 @@ commands =
commands =
poetry run bandit -c bandit.yml -v -r cyclonedx tests examples tools

[testenv:pyupgrade]
allowlist_externals = poetry, sh
commands = sh -c "\
find cyclonedx typings tests tools examples -type f \( -name '*.py' -or -name '*.pyi' \) -print0 \
| xargs -0 poetry run pyupgrade --py39-plus "

[testenv:isort]
commands = poetry run isort .

[testenv:autopep8]
commands = poetry run autopep8 --in-place -r .
Loading