view .gitlab-ci.yml @ 6190:5c1df14ed456 mercurial-4.7

branching: closing test-compat branch for mercurial-4.7
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 23 Feb 2022 17:33:32 +0300
parents 8bd3348c4150
children 3641f0a2d1cc
line wrap: on
line source

.prepare_hg: &prepare_hg
    - hg pull -R /ci/repos/mercurial/
    - hg_branch=$(tests/testlib/map-hg-rev.sh "$(hg identify --branch)")
    - hg -R /ci/repos/mercurial/ update "$hg_branch"
    - hg_rev=$(hg log -R /ci/repos/mercurial/ -r . -T '{node}')
    - echo testing with mercurial branch="$hg_branch", revision="$hg_rev"

pytype:
    image: registry.heptapod.net/mercurial/ci-images/py3-hgext3rd
    script:
        - *prepare_hg
        - pytype --version
        - jobs=$(python -c 'import multiprocessing; print multiprocessing.cpu_count()')
        - pytype -P /ci/repos/mercurial/:hgext3rd -k hgext3rd -x hgext3rd/evolve/thirdparty -j $jobs || true
    when: manual

variables:
    PY: py2
    PYTHON: python
    RUNTEST_ARGS: ""
    TEST_HGMODULEPOLICY: "allow"

.runtests_template: &runtests
    image: registry.heptapod.net/mercurial/ci-images/$PY-hgext3rd
    before_script:
        - (cd tests; ls -1 test-check-*.t > /tmp/check-tests.txt)
    script:
        - *prepare_hg
        - ("$PYTHON" --version)
        - jobs=$(python -c 'import multiprocessing; print multiprocessing.cpu_count()')
        - (cd tests; set -x; HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" /ci/repos/mercurial/tests/run-tests.py -j $jobs --color=always $RUNTEST_ARGS)

checks-py2:
    <<: *runtests
    variables:
        RUNTEST_ARGS: "--test-list /tmp/check-tests.txt"

tests-py2-cext:
    <<: *runtests
    variables:
        RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt"
        TEST_HGMODULEPOLICY: "c"

tests-py2-pure:
    <<: *runtests
    variables:
        RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
        TEST_HGMODULEPOLICY: "py"

doc:
    image: registry.heptapod.net/mercurial/ci-images/py3-evolve-doc
    script:
        - cd docs/
        - make
    variables:
        LANG: en_US.UTF-8
        PYTHON: python3
        PYTHONPATH: "/ci/repos/mercurial:$PYTHONPATH"
        SPHINXBUILD: python3 -m sphinx -b html
    artifacts:
        paths:
            - html/*

sdist:
    stage: .post
    image: registry.heptapod.net/mercurial/ci-images/py3-hgext3rd
    script:
        - python3 setup.py sdist
    artifacts:
        paths:
            - dist/*
    only:
        - tags