.gitlab-ci.yml
branchmercurial-4.5
changeset 4987 e1f53a68b146
parent 4979 c46f0430a668
child 5036 9bae4cf5aa68
--- a/.gitlab-ci.yml	Sat Oct 05 13:50:13 2019 -0400
+++ b/.gitlab-ci.yml	Mon Dec 09 23:54:50 2019 +0100
@@ -1,12 +1,13 @@
 flake8:
-    script:
-        - pip install --user flake8
-        - hg files -0 'set:(**.py or grep("^#!.*python")) - removed()' -X hgext3rd/evolve/thirdparty | xargs -0 ~/.local/bin/flake8
-tests:
+    image: octobus/ci-py2-hgext3rd
     script:
-        - echo $PWD
-        - rm -rf /tmp/mercurial-clone-`hg log -r . -T "{node}"`
-        - hg clone https://mirror.octobus.net/hg/ /tmp/mercurial-clone-`hg log -r . -T "{node}"` --config share.pool=/tmp/
-        - hg -R /tmp/mercurial-clone-`hg log -r . -T "{node}"` update `hg log -r . -T '{branch}'`
-        - (cd tests; /tmp/mercurial-clone-`hg log -r . -T "{node}"`/tests/run-tests.py -j 3)
-        - rm -rf /tmp/mercurial-clone-`hg log -r . -T "{node}"`
+        - hg files -0 'set:(**.py or grep("^#!.*python")) - removed()' -X hgext3rd/evolve/thirdparty | xargs -0 flake8
+
+tests-py2-cext:
+    image: octobus/ci-py2-hgext3rd
+    script:
+        - hg pull -R /ci/repos/mercurial/
+        - hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')")
+        - hg -R /ci/repos/mercurial/ update "$hg_rev"
+        - jobs=$(python -c 'import multiprocessing; print multiprocessing.cpu_count()')
+        - (cd tests; /ci/repos/mercurial/tests/run-tests.py -j $jobs --color=always)