Skip to content
Snippets Groups Projects
.gitlab-ci.yml 2.01 KiB
Newer Older
stages:
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:
  image: octobus/ci-hgitaly:variable-hg
    - 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.
    - pip3 install dist/*.tar.gz
.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
  image: ${BASE_IMAGES_COLLECTION}/hg-current:${BASE_IMAGES_TAG}

tests-hg-stable:
  image: ${BASE_IMAGES_COLLECTION}/hg-stable:${BASE_IMAGES_TAG}

tests-hg-default:
  image: ${BASE_IMAGES_COLLECTION}/hg-default:${BASE_IMAGES_TAG}