mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add linter
This commit is contained in:
parent
c33e61ab2e
commit
d6095a3c0f
1 changed files with 56 additions and 27 deletions
|
@ -1,9 +1,25 @@
|
||||||
stages:
|
stages:
|
||||||
- postinstall
|
- postinstall
|
||||||
- tests
|
- tests
|
||||||
|
- lint
|
||||||
|
|
||||||
.tests:
|
########################################
|
||||||
|
# POSTINSTALL
|
||||||
|
########################################
|
||||||
|
|
||||||
|
postinstall:
|
||||||
|
image: before-postinstall
|
||||||
|
stage: postinstall
|
||||||
|
script:
|
||||||
|
- yunohost tools postinstall -d domain.tld -p the_password --ignore-dyndns
|
||||||
|
|
||||||
|
########################################
|
||||||
|
# TESTS
|
||||||
|
########################################
|
||||||
|
|
||||||
|
.test-stage:
|
||||||
image: after-postinstall
|
image: after-postinstall
|
||||||
|
stage: tests
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get install python-pip -y
|
- apt-get install python-pip -y
|
||||||
- mkdir -p .pip
|
- mkdir -p .pip
|
||||||
|
@ -25,77 +41,90 @@ stages:
|
||||||
- src/yunohost/tests/apps
|
- src/yunohost/tests/apps
|
||||||
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
|
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
|
||||||
|
|
||||||
postinstall:
|
|
||||||
image: before-postinstall
|
|
||||||
stage: postinstall
|
|
||||||
script:
|
|
||||||
- yunohost tools postinstall -d domain.tld -p the_password --ignore-dyndns
|
|
||||||
|
|
||||||
root-tests:
|
root-tests:
|
||||||
extends: .tests
|
extends: .test-stage
|
||||||
stage: tests
|
|
||||||
script:
|
script:
|
||||||
- py.test tests
|
- py.test tests
|
||||||
|
|
||||||
test-apps:
|
test-apps:
|
||||||
extends: .tests
|
extends: .test-stage
|
||||||
stage: tests
|
|
||||||
script:
|
script:
|
||||||
- cd src/yunohost
|
- cd src/yunohost
|
||||||
- py.test tests/test_apps.py
|
- py.test tests/test_apps.py
|
||||||
|
|
||||||
test-appscatalog:
|
test-appscatalog:
|
||||||
extends: .tests
|
extends: .test-stage
|
||||||
stage: tests
|
|
||||||
script:
|
script:
|
||||||
- cd src/yunohost
|
- cd src/yunohost
|
||||||
- py.test tests/test_appscatalog.py
|
- py.test tests/test_appscatalog.py
|
||||||
|
|
||||||
test-appurl:
|
test-appurl:
|
||||||
extends: .tests
|
extends: .test-stage
|
||||||
stage: tests
|
|
||||||
script:
|
script:
|
||||||
- cd src/yunohost
|
- cd src/yunohost
|
||||||
- py.test tests/test_appurl.py
|
- py.test tests/test_appurl.py
|
||||||
|
|
||||||
test-backuprestore:
|
test-backuprestore:
|
||||||
extends: .tests
|
extends: .test-stage
|
||||||
stage: tests
|
|
||||||
script:
|
script:
|
||||||
- cd src/yunohost
|
- cd src/yunohost
|
||||||
- py.test tests/test_backuprestore.py
|
- py.test tests/test_backuprestore.py
|
||||||
|
|
||||||
test-changeurl:
|
test-changeurl:
|
||||||
extends: .tests
|
extends: .test-stage
|
||||||
stage: tests
|
|
||||||
script:
|
script:
|
||||||
- cd src/yunohost
|
- cd src/yunohost
|
||||||
- py.test tests/test_changeurl.py
|
- py.test tests/test_changeurl.py
|
||||||
|
|
||||||
test-permission:
|
test-permission:
|
||||||
extends: .tests
|
extends: .test-stage
|
||||||
stage: tests
|
|
||||||
script:
|
script:
|
||||||
- cd src/yunohost
|
- cd src/yunohost
|
||||||
- py.test tests/test_permission.py
|
- py.test tests/test_permission.py
|
||||||
|
|
||||||
test-settings:
|
test-settings:
|
||||||
extends: .tests
|
extends: .test-stage
|
||||||
stage: tests
|
|
||||||
script:
|
script:
|
||||||
- cd src/yunohost
|
- cd src/yunohost
|
||||||
- py.test tests/test_settings.py
|
- py.test tests/test_settings.py
|
||||||
|
|
||||||
test-user-group:
|
test-user-group:
|
||||||
extends: .tests
|
extends: .test-stage
|
||||||
stage: tests
|
|
||||||
script:
|
script:
|
||||||
- cd src/yunohost
|
- cd src/yunohost
|
||||||
- py.test tests/test_user-group.py
|
- py.test tests/test_user-group.py
|
||||||
|
|
||||||
test-regenconf:
|
test-regenconf:
|
||||||
extends: .tests
|
extends: .test-stage
|
||||||
stage: tests
|
|
||||||
script:
|
script:
|
||||||
- cd src/yunohost
|
- cd src/yunohost
|
||||||
- py.test tests/test_regenconf.py
|
- py.test tests/test_regenconf.py
|
||||||
|
|
||||||
|
########################################
|
||||||
|
# LINTER
|
||||||
|
########################################
|
||||||
|
|
||||||
|
.lint-stage:
|
||||||
|
image: before-postinstall
|
||||||
|
stage: lint
|
||||||
|
before_script:
|
||||||
|
- apt-get install python-pip -y
|
||||||
|
- mkdir -p .pip
|
||||||
|
- pip install -U pip
|
||||||
|
- hash -d pip
|
||||||
|
- pip --cache-dir=.pip install flake8 blake
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .pip
|
||||||
|
- src/yunohost/tests/apps
|
||||||
|
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
|
||||||
|
|
||||||
|
lint:
|
||||||
|
extends: .lint-stage
|
||||||
|
script:
|
||||||
|
- flake8 src tests data
|
||||||
|
|
||||||
|
format-check:
|
||||||
|
extends: .lint-stage
|
||||||
|
script:
|
||||||
|
- black {posargs:--check --diff} src tests data
|
Loading…
Add table
Reference in a new issue