Skip to content

Commit

Permalink
Update CircleCI config (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnair1 authored Mar 14, 2021
1 parent 55816d5 commit a2ed917
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 17 deletions.
42 changes: 27 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,51 @@
version: 2
version: 2.1
orbs:
snyk: snyk/[email protected]
jobs:
test_coco_assistant:
working_directory: ~/project
docker:
- image: circleci/python:3.6.6
steps:
- checkout
# - restore_cache:
# key: coco-{{ .Branch }}
- run:
name: Setup environment
command: |
sudo chown -R circleci:circleci /usr/local/
python -m pip install --upgrade pip
python -m pip install Cython numpy
python -m pip install -r requirements-dev.txt
# - save_cache:
# key: coco-{{ .Branch }}
# paths:
# - "/home/circleci/.cache/pip"
- snyk/scan
- run:
name: Runnning tests
command: |
virtualenv venv
. venv/bin/activate
pip install --upgrade pip
pip install Cython numpy==1.16.0
pip install -r requirements.txt
pip install pytest coverage codacy-coverage
make remove && make clean
make remove && sudo make clean
mkdir test-results
pytest --junitxml=test-results/junit.xml tests/tests.py
coverage run tests/tests.py
coverage report -m
coverage html && coverage xml
python-codacy-coverage -r coverage.xml
- store_test_results:
path: test-results
- store_artifacts:
path: coverage


workflows:
version: 2
test-all:
version: 2.1
build_test:
jobs:
- test_coco_assistant:
filters:
branches:
only:
- master
- dev




20 changes: 20 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# project requirements
Cython
matplotlib
numpy
pandas
Pillow>=8.1.1
git+https://github.com/ashnair1/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI
seaborn
scikit-image
tqdm

# packaging
setuptools>=40.6.3
wheel>=0.32.3

# testing
requests
pytest
coverage
codacy-coverage
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ tqdm
setuptools>=40.6.3
wheel>=0.32.3

# testing
requests

0 comments on commit a2ed917

Please sign in to comment.