From fe9a4fba5defc392185fb500f5bf87ed5827b8b2 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 7 Aug 2024 18:06:54 +0200 Subject: [PATCH] ci: new image names, now using 'shared' image build process with the appci --- .gitlab/ci/bot.gitlab-ci.yml | 4 +- .gitlab/ci/build.gitlab-ci.yml | 2 +- .gitlab/ci/install.gitlab-ci.yml | 2 +- .gitlab/ci/lint.gitlab-ci.yml | 8 ++-- .gitlab/ci/test.gitlab-ci.yml | 75 +------------------------------- 5 files changed, 9 insertions(+), 82 deletions(-) diff --git a/.gitlab/ci/bot.gitlab-ci.yml b/.gitlab/ci/bot.gitlab-ci.yml index cd44527a4..b8879c51d 100644 --- a/.gitlab/ci/bot.gitlab-ci.yml +++ b/.gitlab/ci/bot.gitlab-ci.yml @@ -1,6 +1,6 @@ generate-helpers-doc: stage: bot - image: "before-install" + image: "build-and-lint" needs: [] before_script: - git config --global user.email "yunohost@yunohost.org" @@ -30,7 +30,7 @@ generate-helpers-doc: autofix-translated-strings: stage: bot - image: "before-install" + image: "build-and-lint" needs: [] before_script: - git config --global user.email "yunohost@yunohost.org" diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index 24db69407..40ad35d12 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -3,7 +3,7 @@ needs: - job: actionsmap - job: invalidcode311 - image: "before-install" + image: "build-and-lint" variables: YNH_SOURCE: "https://github.com/yunohost" YNH_DEBIAN: "bookworm" diff --git a/.gitlab/ci/install.gitlab-ci.yml b/.gitlab/ci/install.gitlab-ci.yml index 0f5571a57..f154cc373 100644 --- a/.gitlab/ci/install.gitlab-ci.yml +++ b/.gitlab/ci/install.gitlab-ci.yml @@ -14,7 +14,7 @@ upgrade: extends: .install-stage - image: "after-install" + image: "core-tests" script: - apt-get update -o Acquire::Retries=3 - systemctl restart nginx || journalctl -u nginx -n 50 --no-pager --no-hostname diff --git a/.gitlab/ci/lint.gitlab-ci.yml b/.gitlab/ci/lint.gitlab-ci.yml index 5a8351413..ddafbae4f 100644 --- a/.gitlab/ci/lint.gitlab-ci.yml +++ b/.gitlab/ci/lint.gitlab-ci.yml @@ -5,7 +5,7 @@ actionsmap: stage: lint - image: "before-install" + image: "build-and-lint" needs: [] script: - python -c 'import yaml; yaml.safe_load(open("share/actionsmap.yml"))' @@ -13,7 +13,7 @@ actionsmap: lint311: stage: lint - image: "before-install" + image: "build-and-lint" needs: [] allow_failure: true script: @@ -21,14 +21,14 @@ lint311: invalidcode311: stage: lint - image: "before-install" + image: "build-and-lint" needs: [] script: - tox -e py311-invalidcode mypy: stage: lint - image: "before-install" + image: "build-and-lint" needs: [] script: - tox -e py311-mypy diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index 6161eb0c9..30711f5ff 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -4,7 +4,7 @@ .test-stage: stage: test - image: "after-install" + image: "cote-tests" variables: PYTEST_ADDOPTS: "--color=yes" before_script: @@ -26,28 +26,6 @@ # TESTS ######################################## -#full-tests: -# stage: test -# image: "before-install" -# variables: -# PYTEST_ADDOPTS: "--color=yes" -# before_script: -# - *install_debs -# - yunohost tools postinstall -d domain.tld -u syssa -F 'Syssa Mine' -p the_password --ignore-dyndns --force-diskspace -# script: -# - python3 -m pytest --cov=yunohost tests/ src/tests/ --junitxml=report.xml -# needs: -# - job: build-yunohost -# artifacts: true -# - job: build-ssowat -# artifacts: true -# - job: build-moulinette -# artifacts: true -# coverage: '/TOTAL.*\s+(\d+%)/' -# artifacts: -# reports: -# junit: report.xml - test-helpers2: extends: .test-stage script: @@ -64,132 +42,81 @@ test-domains: extends: .test-stage script: - python3 -m pytest src/tests/test_domains.py -# only: -# changes: -# - src/domain.py test-dns: extends: .test-stage script: - python3 -m pytest src/tests/test_dns.py -# only: -# changes: -# - src/dns.py -# - src/utils/dns.py test-apps: extends: .test-stage script: - python3 -m pytest src/tests/test_apps.py -# only: -# changes: -# - src/app.py test-appscatalog: extends: .test-stage script: - python3 -m pytest src/tests/test_app_catalog.py -# only: -# changes: -# - src/app_calalog.py test-appurl: extends: .test-stage script: - python3 -m pytest src/tests/test_appurl.py -# only: -# changes: -# - src/app.py test-questions: extends: .test-stage script: - python3 -m pytest src/tests/test_questions.py -# only: -# changes: -# - src/utils/config.py test-app-config: extends: .test-stage script: - python3 -m pytest src/tests/test_app_config.py -# only: -# changes: -# - src/app.py -# - src/utils/config.py test-app-resources: extends: .test-stage script: - python3 -m pytest src/tests/test_app_resources.py -# only: -# changes: -# - src/app.py -# - src/utils/resources.py test-changeurl: extends: .test-stage script: - python3 -m pytest src/tests/test_changeurl.py -# only: -# changes: -# - src/app.py test-backuprestore: extends: .test-stage script: - python3 -m pytest src/tests/test_backuprestore.py -# only: -# changes: -# - src/backup.py test-permission: extends: .test-stage script: - python3 -m pytest src/tests/test_permission.py -# only: -# changes: -# - src/permission.py test-settings: extends: .test-stage script: - python3 -m pytest src/tests/test_settings.py -# only: -# changes: -# - src/settings.py test-user-group: extends: .test-stage script: - python3 -m pytest src/tests/test_user-group.py -# only: -# changes: -# - src/user.py test-regenconf: extends: .test-stage script: - python3 -m pytest src/tests/test_regenconf.py -# only: -# changes: -# - src/regenconf.py test-service: extends: .test-stage script: - python3 -m pytest src/tests/test_service.py -# only: -# changes: -# - src/service.py test-ldapauth: extends: .test-stage script: - python3 -m pytest src/tests/test_ldapauth.py -# only: -# changes: -# - src/authenticators/*.py test-sso-and-portalapi: extends: .test-stage