mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
171 lines
3.7 KiB
YAML
171 lines
3.7 KiB
YAML
.install_debs: &install_debs
|
|
- DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb
|
|
|
|
.test-stage:
|
|
stage: test
|
|
image: "core-tests"
|
|
variables:
|
|
PYTEST_ADDOPTS: "--color=yes --cov=src"
|
|
COVERAGE_FILE: ".coverage_$CI_JOB_NAME"
|
|
before_script:
|
|
- *install_debs
|
|
- ln -s src yunohost
|
|
needs:
|
|
- job: build-yunohost
|
|
artifacts: true
|
|
- job: build-ssowat
|
|
artifacts: true
|
|
- job: build-moulinette
|
|
artifacts: true
|
|
- job: upgrade
|
|
artifacts:
|
|
paths:
|
|
- ./.coverage_*
|
|
|
|
########################################
|
|
# TESTS
|
|
########################################
|
|
|
|
test-helpers2:
|
|
extends: .test-stage
|
|
script:
|
|
- cd tests
|
|
- bash test_helpers.sh
|
|
|
|
test-helpers2.1:
|
|
extends: .test-stage
|
|
script:
|
|
- cd tests
|
|
- bash test_helpers.sh 2.1
|
|
|
|
test-domains:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_domains.py
|
|
|
|
test-dns:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_dns.py
|
|
|
|
test-apps:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_apps.py
|
|
|
|
test-appscatalog:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_app_catalog.py
|
|
|
|
test-appurl:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_appurl.py
|
|
|
|
test-questions:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_questions.py
|
|
|
|
test-app-config:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_app_config.py
|
|
|
|
test-app-resources:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_app_resources.py
|
|
|
|
test-changeurl:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_changeurl.py
|
|
|
|
test-backuprestore:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_backuprestore.py
|
|
|
|
test-permission:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_permission.py
|
|
|
|
test-settings:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_settings.py
|
|
|
|
test-user-group:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_user-group.py
|
|
|
|
test-regenconf:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_regenconf.py
|
|
|
|
test-service:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_service.py
|
|
|
|
test-ldapauth:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_ldapauth.py
|
|
|
|
test-sso-and-portalapi:
|
|
extends: .test-stage
|
|
script:
|
|
- python3 -m pytest src/tests/test_sso_and_portalapi.py
|
|
|
|
########################################
|
|
# COVERAGE REPORT
|
|
########################################
|
|
|
|
coverage:
|
|
stage: test
|
|
image: "core-tests"
|
|
needs:
|
|
# Yeah ... gotta list all of those individually ... https://gitlab.com/gitlab-org/gitlab/-/issues/332326
|
|
- job: test-domains
|
|
artifacts: true
|
|
- job: test-dns
|
|
artifacts: true
|
|
- job: test-apps
|
|
artifacts: true
|
|
- job: test-appscatalog
|
|
artifacts: true
|
|
- job: test-appurl
|
|
artifacts: true
|
|
- job: test-questions
|
|
artifacts: true
|
|
- job: test-app-config
|
|
artifacts: true
|
|
- job: test-app-resources
|
|
artifacts: true
|
|
- job: test-changeurl
|
|
artifacts: true
|
|
- job: test-backuprestore
|
|
artifacts: true
|
|
- job: test-permission
|
|
artifacts: true
|
|
- job: test-settings
|
|
artifacts: true
|
|
- job: test-user-group
|
|
artifacts: true
|
|
- job: test-regenconf
|
|
artifacts: true
|
|
- job: test-service
|
|
artifacts: true
|
|
- job: test-ldapauth
|
|
artifacts: true
|
|
- job: test-sso-and-portalapi
|
|
artifacts: true
|
|
script:
|
|
- coverage combine ./.coverage_*
|
|
- coverage report
|