Make sure CI script can call /bin/env python`
[alexxy/gromacs.git] / admin / gitlab-ci / lint.gitlab-ci.yml
index a283c5f5d69e85d566df74e48b6c85bbad69ccc8..6b6c48897b073500ea105faff04f7c1b83397e99 100644 (file)
@@ -52,6 +52,8 @@ clang-tidy:test:
     KUBERNETES_CPU_REQUEST: 2
     KUBERNETES_MEMORY_REQUEST: 4Gi
   script:
+    # Make sure that a Python interpreter can be found for `/bin/env python`
+    - test -x /usr/bin/python || update-alternatives --install /usr/bin/python python /usr/bin/python3 1
     # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
     - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
     - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)