From 53bc87149a920b3b72df877482e94a067fbcd3ab Mon Sep 17 00:00:00 2001 From: Kayou Date: Mon, 10 Aug 2020 11:40:53 +0200 Subject: [PATCH 1/4] Update lint.gitlab-ci.yml --- .gitlab/ci/lint.gitlab-ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab/ci/lint.gitlab-ci.yml b/.gitlab/ci/lint.gitlab-ci.yml index c6967d5a5..a7dbe3aab 100644 --- a/.gitlab/ci/lint.gitlab-ci.yml +++ b/.gitlab/ci/lint.gitlab-ci.yml @@ -17,8 +17,9 @@ invalidcode: script: - tox -e invalidcode -# Disabled, waiting for buster -#format-check: -# extends: .lint-stage -# script: -# - black --check --diff +format-check: + stage: lint + image: "before-install" + needs: [] + script: + - black --check --diff From e35d806ae1e89062250fd72b91625ce5880c1989 Mon Sep 17 00:00:00 2001 From: Kayou Date: Mon, 10 Aug 2020 12:04:34 +0200 Subject: [PATCH 2/4] Update lint.gitlab-ci.yml --- .gitlab/ci/lint.gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab/ci/lint.gitlab-ci.yml b/.gitlab/ci/lint.gitlab-ci.yml index a7dbe3aab..9a2d1d95f 100644 --- a/.gitlab/ci/lint.gitlab-ci.yml +++ b/.gitlab/ci/lint.gitlab-ci.yml @@ -1,6 +1,7 @@ ######################################## # LINTER ######################################## +# later we must fix lint and format-check jobs and remove "allow_failure" lint: stage: lint @@ -21,5 +22,6 @@ format-check: stage: lint image: "before-install" needs: [] + allow_failure: true script: - - black --check --diff + - black --check --diff src doc data tests From 93bff46bc3a68a30af1e71ab6c75de02dd620062 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 17 Aug 2020 23:54:20 +0200 Subject: [PATCH 3/4] imove tox and add python3 linter --- .gitlab/ci/lint.gitlab-ci.yml | 26 +++++++++++++++++++++----- tox.ini | 25 ++++++------------------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/.gitlab/ci/lint.gitlab-ci.yml b/.gitlab/ci/lint.gitlab-ci.yml index 9a2d1d95f..8db1ee756 100644 --- a/.gitlab/ci/lint.gitlab-ci.yml +++ b/.gitlab/ci/lint.gitlab-ci.yml @@ -3,20 +3,36 @@ ######################################## # later we must fix lint and format-check jobs and remove "allow_failure" -lint: +lint27: stage: lint image: "before-install" needs: [] allow_failure: true script: - - tox -e lint + - tox -e py27-lint -invalidcode: +lint37: + stage: lint + image: "before-install" + needs: [] + allow_failure: true + script: + - tox -e py37-lint + +invalidcode27: stage: lint image: "before-install" needs: [] script: - - tox -e invalidcode + - tox -e py27-invalidcode + +invalidcode37: + stage: lint + image: "before-install" + allow_failure: true + needs: [] + script: + - tox -e py37-invalidcode format-check: stage: lint @@ -24,4 +40,4 @@ format-check: needs: [] allow_failure: true script: - - black --check --diff src doc data tests + - tox -e py37-black diff --git a/tox.ini b/tox.ini index 4598ad3d3..0c0b01a5e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,25 +1,12 @@ [tox] -envlist = - py27 - lint -skipdist = True +envlist = py{27,37}-{lint,invalidcode},py37-black [testenv] skip_install=True deps = - pytest >= 4.6.3, < 5.0 - pyyaml >= 5.1.2, < 6.0 - flake8 >= 3.7.9, < 3.8 - urllib3 + py{27,37}-{lint,invalidcode}: flake8 + py37-black: black commands = - pytest {posargs} - -[testenv:lint] -skip_install=True -commands = flake8 src doc data tests -deps = flake8 - -[testenv:invalidcode] -skip_install=True -commands = flake8 src data --exclude src/yunohost/tests --select F --ignore F401,F841 -deps = flake8 + py{27,37}-lint: flake8 src doc data tests + py{27,37}-invalidcode: flake8 src data --exclude src/yunohost/tests --select F --ignore F401,F841 + py37-black: black --check --diff src doc data tests \ No newline at end of file From 0c9b6eec98ad223a98a1662b6d234c63a89f14e5 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 18 Aug 2020 00:02:08 +0200 Subject: [PATCH 4/4] fix travis --- .travis.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8674d4d03..9a0f40674 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,18 @@ language: python matrix: allow_failures: - - env: TOXENV=lint + - env: TOXENV=py27-lint + - env: TOXENV=py37-lint + - env: TOXENV=py37-invalidcode include: - python: 2.7 - env: TOXENV=py27 + env: TOXENV=py27-lint - python: 2.7 - env: TOXENV=lint + env: TOXENV=py27-invalidcode + - python: 3.7 + env: TOXENV=py37-lint + - python: 3.7 + env: TOXENV=py37-invalidcode install: - pip install tox