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"
|
# later we must fix lint and format-check jobs and remove "allow_failure"
|
||||||
|
|
||||||
lint39:
|
lint311:
|
||||||
stage: lint
|
stage: lint
|
||||||
image: "before-install"
|
image: "before-install"
|
||||||
needs: []
|
needs: []
|
||||||
|
@ -14,16 +14,16 @@ lint39:
|
||||||
before_script:
|
before_script:
|
||||||
- *install_tox
|
- *install_tox
|
||||||
script:
|
script:
|
||||||
- tox -e py39-lint
|
- tox -e py311-lint
|
||||||
|
|
||||||
invalidcode39:
|
invalidcode311:
|
||||||
stage: lint
|
stage: lint
|
||||||
image: "before-install"
|
image: "before-install"
|
||||||
needs: []
|
needs: []
|
||||||
before_script:
|
before_script:
|
||||||
- *install_tox
|
- *install_tox
|
||||||
script:
|
script:
|
||||||
- tox -e py39-invalidcode
|
- tox -e py311-invalidcode
|
||||||
|
|
||||||
mypy:
|
mypy:
|
||||||
stage: lint
|
stage: lint
|
||||||
|
@ -32,7 +32,7 @@ mypy:
|
||||||
before_script:
|
before_script:
|
||||||
- *install_tox
|
- *install_tox
|
||||||
script:
|
script:
|
||||||
- tox -e py39-mypy
|
- tox -e py311-mypy
|
||||||
|
|
||||||
black:
|
black:
|
||||||
stage: lint
|
stage: lint
|
||||||
|
@ -49,7 +49,7 @@ black:
|
||||||
script:
|
script:
|
||||||
# create a local branch that will overwrite distant one
|
# create a local branch that will overwrite distant one
|
||||||
- git checkout -b "ci-format-${CI_COMMIT_REF_NAME}" --no-track
|
- 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 diff | wc -l) != 0 ] || exit 0' # stop if there is nothing to commit
|
||||||
- git commit -am "[CI] Format code with Black" || true
|
- 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}"
|
- 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]
|
[tox]
|
||||||
envlist = py39-{lint,invalidcode},py39-black-{run,check}
|
envlist = py311-{lint,invalidcode},py311-black-{run,check}
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
skip_install=True
|
skip_install=True
|
||||||
deps =
|
deps =
|
||||||
py39-{lint,invalidcode}: flake8
|
py311-{lint,invalidcode}: flake8
|
||||||
py39-black-{run,check}: black
|
py311-black-{run,check}: black
|
||||||
py39-mypy: mypy >= 0.900
|
py311-mypy: mypy >= 0.900
|
||||||
commands =
|
commands =
|
||||||
py39-lint: flake8 src doc maintenance tests --ignore E402,E501,E203,W503,E741 --exclude src/vendor
|
py311-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
|
py311-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
|
py311-black-check: black --check --diff bin src doc maintenance tests
|
||||||
py39-black-run: black bin src doc maintenance tests
|
py311-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-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