【发布时间】:2021-04-04 12:57:18
【问题描述】:
尝试 gitlab ci 集成,并在尝试运行 flake8 检查时遇到此问题
ci 配置
image: "python:3.9"
before_script:
- python --version
- pip install pipenv
- pipenv install
stages:
- Static Analysis
flake8:
stage: Static Analysis
script:
- pipenv run flake8 --max-line-length=120 sample/*.py
$ pipenv run flake8 --max-line-length=120 sample/*.py
Error: the command flake8 could not be found within PATH or Pipfile's [scripts].
【问题讨论】:
-
你必须安装
flake8。 -
但是 pipenv install 应该安装 flake8,对吧?
-
仅当配置为这样做时。
-
@KlausD。你能详细说明一下,如何配置它来做到这一点
-
告诉我们你的
Pipfile!