mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
py39->py311 in tox
This commit is contained in:
parent
1af88b0c55
commit
bed9ecc09e
2 changed files with 15 additions and 15 deletions
|
@ -6,7 +6,7 @@
|
|||
########################################
|
||||
# later we must fix lint and format-check jobs and remove "allow_failure"
|
||||
|
||||
lint39:
|
||||
lint311:
|
||||
stage: lint
|
||||
image: "before-install"
|
||||
needs: []
|
||||
|
@ -14,16 +14,16 @@ lint39:
|
|||
before_script:
|
||||
- *install_tox
|
||||
script:
|
||||
- tox -e py39-lint
|
||||
- tox -e py311-lint
|
||||
|
||||
invalidcode39:
|
||||
invalidcode311:
|
||||
stage: lint
|
||||
image: "before-install"
|
||||
needs: []
|
||||
before_script:
|
||||
- *install_tox
|
||||
script:
|
||||
- tox -e py39-invalidcode
|
||||
- tox -e py311-invalidcode
|
||||
|
||||
mypy:
|
||||
stage: lint
|
||||
|
@ -32,7 +32,7 @@ mypy:
|
|||
before_script:
|
||||
- *install_tox
|
||||
script:
|
||||
- tox -e py39-mypy
|
||||
- tox -e py311-mypy
|
||||
|
||||
black:
|
||||
stage: lint
|
||||
|
@ -49,7 +49,7 @@ black:
|
|||
script:
|
||||
# create a local branch that will overwrite distant one
|
||||
- git checkout -b "ci-format-${CI_COMMIT_REF_NAME}" --no-track
|
||||
- tox -e py39-black-run
|
||||
- tox -e py311-black-run
|
||||
- '[ $(git diff | wc -l) != 0 ] || exit 0' # stop if there is nothing to commit
|
||||
- git commit -am "[CI] Format code with Black" || true
|
||||
- git push -f origin "ci-format-${CI_COMMIT_REF_NAME}":"ci-format-${CI_COMMIT_REF_NAME}"
|
||||
|
|
18
tox.ini
18
tox.ini
|
@ -1,15 +1,15 @@
|
|||
[tox]
|
||||
envlist = py39-{lint,invalidcode},py39-black-{run,check}
|
||||
envlist = py311-{lint,invalidcode},py311-black-{run,check}
|
||||
|
||||
[testenv]
|
||||
skip_install=True
|
||||
deps =
|
||||
py39-{lint,invalidcode}: flake8
|
||||
py39-black-{run,check}: black
|
||||
py39-mypy: mypy >= 0.900
|
||||
py311-{lint,invalidcode}: flake8
|
||||
py311-black-{run,check}: black
|
||||
py311-mypy: mypy >= 0.900
|
||||
commands =
|
||||
py39-lint: flake8 src doc maintenance tests --ignore E402,E501,E203,W503,E741 --exclude src/vendor
|
||||
py39-invalidcode: flake8 src bin maintenance --exclude src/tests,src/vendor --select F,E722,W605
|
||||
py39-black-check: black --check --diff bin src doc maintenance tests
|
||||
py39-black-run: black bin src doc maintenance tests
|
||||
py39-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/ --exclude (acme_tiny|migrations)
|
||||
py311-lint: flake8 src doc maintenance tests --ignore E402,E501,E203,W503,E741 --exclude src/vendor
|
||||
py311-invalidcode: flake8 src bin maintenance --exclude src/tests,src/vendor --select F,E722,W605
|
||||
py311-black-check: black --check --diff bin src doc maintenance tests
|
||||
py311-black-run: black bin src doc maintenance tests
|
||||
py311-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/ --exclude (acme_tiny|migrations)
|
||||
|
|
Loading…
Add table
Reference in a new issue