changeset 51696:6aa74bcd4255

Try the full CI run
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 18 Jul 2024 15:48:05 +0200
parents d859554a9187
children 4f4f65c67729
files contrib/heptapod-ci.yml contrib/setup-pytype.sh
diffstat 2 files changed, 9 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/heptapod-ci.yml	Thu Jul 18 14:57:37 2024 +0200
+++ b/contrib/heptapod-ci.yml	Thu Jul 18 15:48:05 2024 +0200
@@ -22,7 +22,7 @@
 stages:
   - tests
 
-image: registry.heptapod.net/mercurial/ci-images/mercurial-core@sha256:16720f3e2ba29408f816b87407841d77a01ea6e9fe29894181cea6513cc8bfec
+image: registry.heptapod.net/mercurial/ci-images/mercurial-core@sha256:0e75333b941efb5cfe81543e97fb15931fa7b6eb5d8f5e4d5dbdf1df008a4a94
 
 variables:
     PYTHON: python
@@ -39,17 +39,16 @@
     # The runner made a clone as root.
     # We make a new clone owned by user used to run the step.
     before_script:
-      - whoami
-      - pyenv shell 3.7.17
+      - export PATH="/home/ci-runner/vendor/pyenv/pyenv-2.4.7-adf3c2bccf09cdb81febcfd15b186711a33ac7a8/shims:/home/ci-runner/vendor/pyenv/pyenv-2.4.7-adf3c2bccf09cdb81febcfd15b186711a33ac7a8/bin:$PATH"
+      - echo "python used, $PYTHON"
+      - $PYTHON --version
+      - black --version
+      - clang-format --version
       - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
       - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
       - cd /tmp/mercurial-ci/
       - ls -1 tests/test-check-*.* > /tmp/check-tests.txt
-      - black --version
-      - clang-format --version
     script:
-        - echo "python used, $PYTHON"
-        - $PYTHON --version
         - echo "$RUNTEST_ARGS"
         - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS
 
@@ -64,19 +63,15 @@
     <<: *all
     stage: tests
     script:
-        - echo "python used, $PYTHON"
-        - $PYTHON --version
         - make rust-tests
         - make cargo-clippy
     variables:
-        PYTHON: python
         CI_CLEVER_CLOUD_FLAVOR: S
 
 test-c:
     <<: *runtests
     variables:
         RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt"
-        PYTHON: python
         TEST_HGMODULEPOLICY: "c"
         TEST_HGTESTS_ALLOW_NETIO: "1"
 
@@ -84,7 +79,6 @@
     <<: *runtests
     variables:
         RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
-        PYTHON: python
         TEST_HGMODULEPOLICY: "py"
 
 test-rust:
@@ -100,20 +94,19 @@
     variables:
         HGWITHRUSTEXT: cpython
         RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt"
-        PYTHON: python
         TEST_HGMODULEPOLICY: "rust+c"
 
 test-chg:
     <<: *runtests
     variables:
-        PYTHON: python
         RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg"
         TEST_HGMODULEPOLICY: "c"
 
 check-pytype:
     extends: .runtests_template
     before_script:
-      - pyenv shell 3.7.17
+      - export PATH="/home/ci-runner/vendor/pyenv/pyenv-2.4.7-adf3c2bccf09cdb81febcfd15b186711a33ac7a8/shims:/home/ci-runner/vendor/pyenv/pyenv-2.4.7-adf3c2bccf09cdb81febcfd15b186711a33ac7a8/bin:$PATH"
+      - echo "PATH, $PATH"
       - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
       - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
       - cd /tmp/mercurial-ci/
@@ -123,8 +116,6 @@
     script:
       - echo "Entering script section"
       - sh contrib/check-pytype.sh
-    variables:
-        PYTHON: python
 
 # `sh.exe --login` sets a couple of extra environment variables that are defined
 # in the MinGW shell, but switches CWD to /home/$username.  The previous value
--- a/contrib/setup-pytype.sh	Thu Jul 18 14:57:37 2024 +0200
+++ b/contrib/setup-pytype.sh	Thu Jul 18 15:48:05 2024 +0200
@@ -5,7 +5,7 @@
 
 # Find the python3 setup that would run pytype
 PYTYPE=`which pytype`
-PYTHON3=`head -n1 ${PYTYPE} | sed -s 's/#!//'`
+PYTHON3=${PYTHON:-`head -n1 ${PYTYPE} | sed -s 's/#!//'`}
 
 # Existing stubs that pytype processes live here
 TYPESHED=$(${PYTHON3} -c "import pytype; print(pytype.__path__[0])")/typeshed/stubs