我正在将项目迁移到 Circle CI 2.0。
这是我的config.yml文件。
version: 2
jobs:
build:
docker:
- image: circleci/android:api-26-alpha
- image: circleci/python:3.6.1
steps:
- checkout
- run:
name: pre-dependencies
command: pip install --user codecov
- run: sdkmanager --licenses
- run:
name: override-test
command: ./gradlew --info install test coverage
- run:
name: post-test
command: codecov
由于最后一步显示此错误,Circle CI 构建失败。
#!/bin/bash -eo pipefail
npm install codecov
/bin/bash: npm: command not found
Exited with code 127
这一步预依赖下载了codecov库,这里是这一步的输出:
#!/bin/bash -eo pipefail
pip install --user codecov
Collecting codecov
Downloading codecov-2.0.15-py2.py3-none-any.whl
Collecting requests>=2.7.9 (from codecov)
Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
100% |████████████████████████████████| 92kB 3.5MB/s
Collecting coverage (from codecov)
Downloading coverage-4.5.1-cp27-cp27mu-manylinux1_x86_64.whl (199kB)
100% |████████████████████████████████| 204kB 3.2MB/s
Collecting urllib3<1.23,>=1.21.1 (from requests>=2.7.9->codecov)
Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
100% |████████████████████████████████| 133kB 3.4MB/s
Collecting idna<2.7,>=2.5 (from requests>=2.7.9->codecov)
Downloading idna-2.6-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 2.7MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.7.9->codecov)
Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |████████████████████████████████| 143kB 3.4MB/s
Collecting certifi>=2017.4.17 (from requests>=2.7.9->codecov)
Downloading certifi-2018.1.18-py2.py3-none-any.whl (151kB)
100% |████████████████████████████████| 153kB 3.3MB/s
Installing collected packages: urllib3, idna, chardet, certifi, requests, coverage, codecov
Successfully installed certifi-2018.1.18 chardet-3.0.4 codecov-2.0.15 coverage-4.5.1 idna-2.6 requests-2.18.4 urllib3-1.22
任何想法如何解决它?