代码拉取完成,页面将自动刷新
version: 2.1
workflows:
test:
jobs:
- test-py36
- test-py37
- test-py38
jobs:
test-py36: &test-template
docker:
- image: circleci/python:3.6
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: install dependencies
command: |
python -m venv venv
. venv/bin/activate
pip install -r requirements.txt > /dev/null
pip install torch==1.7.0+cpu torchvision==0.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}
- run:
name: run unittest
command: |
. venv/bin/activate
python -m unittest discover test
- run:
name: test components
command: |
. venv/bin/activate
python -m test_component
- run:
name: test sample
command: |
. venv/bin/activate
# python -m main -m "lenet" -r "hp1" -d "MNIST"
- store_artifacts:
path: test-reports
destination: test-reports
test-py37:
<<: *test-template
docker:
- image: circleci/python:3.7
test-py38:
<<: *test-template
docker:
- image: circleci/python:3.8
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。