Skip to content

Commit 6f9225c

Browse files
authored
chore: Setup codeclimate test cov on circleci (#1)
1 parent a8ef0ff commit 6f9225c

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

.circleci/config.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,37 @@ jobs:
33
build:
44
docker:
55
- image: circleci/python:3.6.1
6+
environment:
7+
CC_TEST_REPORTER_ID: 183b3f0cc4e8fcd87c0395a30578d3d4211441cbf90f7704ba2dce64fa7774be
68
steps:
79
- checkout
810
- run:
911
command: |
1012
sudo apt install python-pip
1113
sudo pip install -U pip pipenv
14+
- run:
15+
command: |
16+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
17+
chmod +x ./cc-test-reporter
1218
- run:
1319
command: |
1420
pipenv --python python3.6
15-
pipenv install --dev
21+
pipenv install --dev
22+
- run:
23+
command: |
24+
./cc-test-reporter before-build
1625
- run:
1726
command: |
1827
pipenv run pytest
28+
./cc-test-reporter format-coverage coverage/coverage.xml -t coverage.py
29+
./cc-test-reporter upload-coverage
1930
- run:
2031
command: |
2132
pipenv run flake8
2233
- run:
2334
command: |
2435
pipenv run safety check
2536
- store_artifacts:
26-
path: htmlcov
27-
destination: htmlcov
37+
path: coverage
38+
destination: coverage
2839

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ pip-delete-this-directory.txt
3838
# Unit test / coverage reports
3939
htmlcov/
4040
.tox/
41+
coverage
4142
.coverage
4243
.coverage.*
4344
.cache

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[pytest]
2-
addopts = -v -s --cov=python_log_sanitizer --cov-report html --cov-report term
2+
addopts = -v -s --cov=python_log_sanitizer --cov-report html:coverage --cov-report term --cov-report xml:coverage/coverage.xml

0 commit comments

Comments
 (0)