Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Circleci and Coverage conf file.
- Loading branch information
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/python:3.5 | ||
environment: | ||
PIPENV_VENV_IN_PROJECT: true | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "Pipfile.lock" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
pipenv install | ||
- save_cache: | ||
paths: | ||
- ./.venv | ||
key: v1-dependencies-{{ checksum "Pipfile.lock" }} | ||
- run: | ||
name: Install OSPD OpenVAS | ||
command: | | ||
pipenv install . | ||
test: | ||
docker: | ||
- image: circleci/python:3.5 | ||
environment: | ||
PIPENV_VENV_IN_PROJECT: true | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "Pipfile.lock" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
pipenv install --dev | ||
pipenv install -e git+https://github.com/greenbone/ospd.git#egg=ospd | ||
- save_cache: | ||
paths: | ||
- ./.venv | ||
key: v1-dependencies-{{ checksum "Pipfile.lock" }} | ||
- run: | ||
name: Install codecov | ||
command: | | ||
pipenv install codecov | ||
- run: | ||
name: Run unit tests | ||
command: | | ||
pipenv run coverage run -m unittest | ||
- run: | ||
name: Upload coverage to Codecov | ||
command: | | ||
pipenv run codecov | ||
workflows: | ||
version: 2 | ||
build_and_test: | ||
jobs: | ||
- build | ||
- test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[run] | ||
omit = | ||
tests/* | ||
*/__init__.py | ||
source = | ||
ospd_openvas | ||
|