diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a5ce02f263d7a6f24624d5fe75ef2a6ed2d38cf0_LmdpdGxhYi1jaS55bWw=..37d21a0e709cc18ccce6ddd846c0b1ad72381134_LmdpdGxhYi1jaS55bWw= 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,12 @@ - main - compat -install: +variables: + # has to be "stable" in the stable branch, and actually we should rename + # "latest" as "default": this would let us just use $CI_COMMIT_HG_BRANCH + BASE_IMAGES_TAG: latest + BASE_IMAGES_COLLECTION: registry.heptapod.net:443/heptapod/ci-images/mercurial + +check-sdist: stage: compat image: octobus/ci-hgitaly:variable-hg @@ -6,4 +12,4 @@ stage: compat image: octobus/ci-hgitaly:variable-hg - before_script: [] + needs: [] script: @@ -9,4 +15,6 @@ script: + - rm -rf dist + - python3 setup.py sdist # most requirements will be preinstalled in the base image (taken from the # default branch of HGitaly at time of image build), but they will be # reexamined and any change will be tested. @@ -10,5 +18,5 @@ # most requirements will be preinstalled in the base image (taken from the # default branch of HGitaly at time of image build), but they will be # reexamined and any change will be tested. - - pip3 install . + - pip3 install dist/*.tar.gz @@ -14,11 +22,21 @@ -variables: - EVOLVE_REPO_URL: https://mirror.octobus.net/evolve - EVOLVE_LOCAL_REPO: /ci/repos/evolve - PY_HEPTAPOD_LOCAL_REPO: /ci/repos/py-heptapod - -before_script: - - hg clone https://foss.heptapod.net/heptapod/py-heptapod $PY_HEPTAPOD_LOCAL_REPO - - pip3 install --user --upgrade -e $PY_HEPTAPOD_LOCAL_REPO +.tests: + script: + # The hgitaly project currently only has one branch: default, and we'll + # have a stable branch only after Heptapod 0.17.0 release. + # At this point, the simplest will be to have the same branch conventions + # in py-heptapod and HGitaly (already implemented below). + # So either both have a `heptapod-0-17` branch + # or we decide that the new versioning rules (see heptapod#352) allow us to + # simply have a `stable` branch in both. + # TODO switch to clone/update, but a first attempt cloning in ./py-heptapod + # led to shadowing problems and bad applied hg config. Using archives is not + # *that* inefficient + - pip3 install https://foss.heptapod.net/heptapod/py-heptapod/-/archive/branch/${CI_COMMIT_HG_BRANCH}/py-heptapod-branch-${CI_COMMIT_HG_BRANCH}.tar.bz2 + # cleanup of previous failed attempt, can be removed after a few weeks + - rm -rf py-heptapod + - pip3 freeze + - flake8 --exclude stub hgitaly hgext3rd + - ./run-all-tests tests-current: @@ -23,3 +41,5 @@ tests-current: + extends: + - .tests stage: main @@ -25,9 +45,4 @@ stage: main - image: octobus/ci-hgitaly - script: - - pip3 freeze - - flake8 --exclude stub hgitaly hgext3rd - - PYTHONPATH=/ci/repos/mercurial ./run-all-tests - + image: ${BASE_IMAGES_COLLECTION}/hg-current:${BASE_IMAGES_TAG} tests-hg-stable: @@ -32,3 +47,5 @@ tests-hg-stable: + extends: + - .tests stage: compat @@ -34,16 +51,4 @@ stage: compat - image: octobus/ci-hgitaly:variable-hg - script: - - hg pull -R /ci/repos/mercurial/ --rev stable - - hg -R /ci/repos/mercurial/ update stable - - hg -R /ci/repos/mercurial summary - - (cd /ci/repos/mercurial; make local PYTHON=python3) - - hg clone -r stable -u stable $EVOLVE_REPO_URL $EVOLVE_LOCAL_REPO - - pip3 install --user $EVOLVE_LOCAL_REPO - - pip3 freeze - - /ci/repos/mercurial/hg version --debug - - PYTHONPATH=/ci/repos/mercurial python3 -c "from mercurial import util; print(util.version())" - - PYTHONPATH=/ci/repos/mercurial PATH=$HOME/.local/bin:$PATH - ./run-all-tests + image: ${BASE_IMAGES_COLLECTION}/hg-stable:${BASE_IMAGES_TAG} tests-hg-default: @@ -48,3 +53,5 @@ tests-hg-default: + extends: + - .tests stage: compat @@ -50,15 +57,2 @@ stage: compat - allow_failure: true - image: octobus/ci-hgitaly:variable-hg - script: - - hg pull -R /ci/repos/mercurial/ --rev default - - hg -R /ci/repos/mercurial/ update default - - hg -R /ci/repos/mercurial summary - - (cd /ci/repos/mercurial; make local PYTHON=python3) - - hg clone -r default -u default $EVOLVE_REPO_URL $EVOLVE_LOCAL_REPO - - pip3 install --user $EVOLVE_LOCAL_REPO - - pip3 freeze - - /ci/repos/mercurial/hg version --debug - - PYTHONPATH=/ci/repos/mercurial python3 -c "from mercurial import util; print(util.version())" - - PYTHONPATH=/ci/repos/mercurial PATH=$HOME/.local/bin:$PATH - ./run-all-tests + image: ${BASE_IMAGES_COLLECTION}/hg-default:${BASE_IMAGES_TAG}