mmpretrain/.gitlab-ci.yml
2020-06-12 14:40:27 +08:00

35 lines
796 B
YAML

image: registry.sensetime.com/eig-research/pytorch:1.3.1-cuda10.1-cudnn7-devel
stages:
- linting
- test
before_script:
- echo $PATH
- gcc --version
- python --version
- pip --version
- nvcc --version
- nvidia-smi
- python -c "import torch; print(torch.__version__)"
linting:
stage: linting
script:
- pip install flake8 yapf isort
- flake8 .
- isort -rc --check-only --diff mmcls/ tools/ tests/
- yapf -r -d mmcls/ tools/ tests/ configs/
test:
stage: test
script:
- echo "Start building..."
- pip install pillow==6.2.2
- pip install -e .
- python -c "import mmcls; print(mmcls.__version__)"
- echo "Start testing..."
- pip install pytest coverage
- coverage run --source mmcls -m pytest tests/
- coverage report -m