我正在尝试在我的CircleCi项目上添加单元测试。在本地,当我从终端运行“ python -m unittest discover”时,它能够找到并运行所有16个测试。但是在CircleCi上说: 关于可能发生的事情的任何想法吗?
我缺少一些配置或环境变量吗? 我的项目结构: config.yml Ran 0 tests in 0.000s
project
├── src
│ ├── main
│ ├── python
│ ├── testing
│ ├──test1.py
| ├──test2.py
version: 2
docker:
- image: circleci/python:3.7.5
jobs:
build:
steps:
- checkout
- restore_cache:
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
- run:
name: Install Python deps in a venv
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements/dev.txt
- save_cache:
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
paths:
- "venv"
- run:
name: Running tests
command: |
cd ~/project/src/main/python/testing/
python3 -m unittest discover
0 个答案:
没有答案