From 6c24755e73d6e764b6fca463e6dc07f966240d90 Mon Sep 17 00:00:00 2001 From: Kayou Date: Sun, 1 Dec 2019 16:51:12 +0900 Subject: [PATCH] Create .gitlab-ci.yml --- .gitlab-ci.yml | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..bb7754e56 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,86 @@ +stages: + - postinstall + - tests + +.tests: + variables: + SNAPSHOT_NAME: "after-postinstall" + before_script: + - apt-get install python-pip -y + - pip2 install pytest pytest-sugar pytest-mock requests-mock mock + - pushd src/yunohost/tests + - git clone https://github.com/YunoHost/test_apps ./apps + - cd apps + - git pull > /dev/null 2>&1 + - popd + - export PYTEST_ADDOPTS="--color=yes" + + +postinstall: + variables: + SNAPSHOT_NAME: "before-postinstall" + stage: postinstall + script: + - yunohost tools postinstall -d domain.tld -p the_password --ignore-dyndns + +root-tests: + extends: .tests + stage: tests + script: + - py.test tests + +test-apps: + extends: .tests + stage: tests + script: + - cd src/yunohost + - py.test tests/test_apps.py + +test-appscatalog: + extends: .tests + stage: tests + script: + - cd src/yunohost + - py.test tests/test_appscatalog.py + +test-appurl: + extends: .tests + stage: tests + script: + - cd src/yunohost + - py.test tests/test_appurl.py + +test-backuprestore: + extends: .tests + stage: tests + script: + - cd src/yunohost + - py.test tests/test_backuprestore.py + +test-changeurl: + extends: .tests + stage: tests + script: + - cd src/yunohost + - py.test tests/test_changeurl.py + +test-permission: + extends: .tests + stage: tests + script: + - cd src/yunohost + - py.test tests/test_permission.py + +test-settings: + extends: .tests + stage: tests + script: + - cd src/yunohost + - py.test tests/test_settings.py + +test-user-group: + extends: .tests + stage: tests + script: + - cd src/yunohost + - py.test tests/test_user-group.py