Skip to content

Commit

Permalink
Merge pull request #100 from nrempel/circleci
Browse files Browse the repository at this point in the history
Circleci integration
  • Loading branch information
andrewwhitehead authored Feb 28, 2019
2 parents 3486077 + 836c6f1 commit 2861079
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: 2
jobs:
build:
docker:
- image: bcgovimages/von-image:py36-1.8-0
steps:
- checkout
- restore_cache:
keys:
- v2-pip-dependencies-{{ .Branch }}-{{ checksum "agent/requirements.txt" }}-{{ checksum "agent/requirements.dev.txt" }}
- v2-pip-dependencies-{{ .Branch }}-
- run:
name: Install Python Dependencies
command: |
cd agent
python3 -m venv venv
. venv/bin/activate
pip install \
-r requirements.txt \
-r requirements.dev.txt \
pytest
- save_cache:
paths:
- agent/venv
key: v2-pip-dependencies-{{ .Branch }}-{{ checksum "agent/requirements.txt" }}-{{ checksum "agent/requirements.dev.txt" }}

- run:
name: Run Agent Tests
command: |
mkdir test-reports
mkdir test-reports/pytest
cd agent
. venv/bin/activate
pytest
- run:
name: Push to Codecov.io
command: |
bash <(curl -s https://codecov.io/bash)
- store_test_results:
path: test-reports

- store_artifacts:
path: test-reports

2 changes: 1 addition & 1 deletion agent/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool:pytest]
testpaths = indy_catalyst_agent
addopts = --cov-config .coveragerc --cov=indy_catalyst_agent --cov-report term --flake8
addopts = --quiet --junitxml=../test-reports/pytest/junit.xml --cov-config .coveragerc --cov=indy_catalyst_agent --cov-report term --cov-report xml --flake8

[flake8]
# https://github.com/ambv/black#line-length
Expand Down

0 comments on commit 2861079

Please sign in to comment.