我第一次尝试使用 gitlab CI。我只想在其上测试(而不是部署)一个 Python 程序。我不知道为什么,但它在 pip 上失败了,找不到...
这是 gitlab 的错误信息:
Skipping Git submodules setup
$ pip install -r requirements.txt
/bin/bash: line 71: pip: command not found
ERROR: Job failed: exit code 1
Run Code Online (Sandbox Code Playgroud)
这里是我的 .gitlab-ci.yaml:
stages:
- build
- test
myJob:
stage: build
image: python:3.6
script:
- apt-get update -q -y
- apt-get install -y python-pip
- python -V
- echo "hello world"
- pip install -r requirements.txt
myJob2:
stage: test
script:
- python test.py
Run Code Online (Sandbox Code Playgroud)
hello world 和 Python 版本都没有打印出来。所以我可能犯了一个基本错误,但哪一个?