Skip to content

Commit ff0e557

Browse files
Codecov (#17)
1 parent e5306e8 commit ff0e557

File tree

2 files changed

+55
-41
lines changed

2 files changed

+55
-41
lines changed

.circleci/config.yml

Lines changed: 53 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ executors:
55
parameters:
66
image_tag:
77
type: string
8-
default: "python:3.7"
8+
default: python:3.7
99
docker:
1010
- image: circleci/<< parameters.image_tag >>
1111

@@ -14,94 +14,107 @@ commands:
1414
steps:
1515
- checkout
1616
- run:
17-
name: "Package Installation to Virtual Environment"
17+
name: Installation
1818
command: |
1919
python setup.py sdist
2020
PACKAGE=$(python setup.py --fullname)
21-
tar -zxvf "dist/${PACKAGE}.tar.gz"
21+
tar -zxvf dist/${PACKAGE}.tar.gz
2222
mv ${PACKAGE} package
2323
virtualenv python -q
2424
source python/bin/activate
2525
pip install -e package --progress-bar off
2626
pip install -r package/test-requirements.txt --progress-bar off
2727
2828
jobs:
29-
lint_tests:
29+
Lint Tests:
3030
parameters:
3131
image_tag:
3232
type: string
33-
default: "python:3.7"
33+
default: python:3.7
3434
executor:
3535
name: python
3636
image_tag: << parameters.image_tag >>
3737
steps:
3838
- installation
3939
- run:
40-
name: "Lint Tests"
40+
name: Lint Tests
4141
command: |
4242
source python/bin/activate
4343
make -C package lint-tests --makefile ../Makefile
4444
45-
unit_tests:
45+
Unit Tests:
4646
parameters:
4747
image_tag:
4848
type: string
49-
default: "python:3.7"
49+
default: python:3.7
50+
codecov:
51+
type: boolean
52+
default: false
5053
executor:
5154
name: python
5255
image_tag: << parameters.image_tag >>
5356
steps:
5457
- installation
5558
- run:
56-
name: "Unit Tests"
59+
name: Unit Tests
5760
command: |
5861
source python/bin/activate
5962
make -C package unit-tests --makefile ../Makefile
63+
- when:
64+
condition: << parameters.codecov >>
65+
steps:
66+
- run:
67+
name: Code Coverage
68+
command: |
69+
source python/bin/activate
70+
cd package
71+
codecov
6072
61-
entry_point_test:
73+
Entry Point Test:
6274
parameters:
6375
image_tag:
6476
type: string
65-
default: "python:3.7"
77+
default: python:3.7
6678
executor:
6779
name: python
6880
image_tag: << parameters.image_tag >>
6981
steps:
7082
- installation
7183
- run:
72-
name: "Entry Point Test"
84+
name: Entry Point Test
7385
command: |
7486
source python/bin/activate
7587
make -C package entry-point-test --makefile ../Makefile
7688
7789
workflows:
7890
version: 2
79-
"Integration Tests":
91+
Integration Tests:
8092
jobs:
81-
- lint_tests:
82-
name: "Lint Tests - Python 3.5"
83-
image_tag: "python:3.5"
84-
- lint_tests:
85-
name: "Lint Tests - Python 3.6"
86-
image_tag: "python:3.6"
87-
- lint_tests:
88-
name: "Lint Tests - Python 3.7"
89-
image_tag: "python:3.7"
90-
- unit_tests:
91-
name: "Unit Tests - Python 3.5"
92-
image_tag: "python:3.5"
93-
- unit_tests:
94-
name: "Unit Tests - Python 3.6"
95-
image_tag: "python:3.6"
96-
- unit_tests:
97-
name: "Unit Tests - Python 3.7"
98-
image_tag: "python:3.7"
99-
- entry_point_test:
100-
name: "Entry Point Test - Python 3.5"
101-
image_tag: "python:3.5"
102-
- entry_point_test:
103-
name: "Entry Point Test - Python 3.6"
104-
image_tag: "python:3.6"
105-
- entry_point_test:
106-
name: "Entry Point Test - Python 3.7"
107-
image_tag: "python:3.7"
93+
- Lint Tests:
94+
name: Py35 - Lint Tests
95+
image_tag: python:3.5
96+
- Lint Tests:
97+
name: Py36 - Lint Tests
98+
image_tag: python:3.6
99+
- Lint Tests:
100+
name: Py37 - Lint Tests
101+
image_tag: python:3.7
102+
- Unit Tests:
103+
name: Py35 - Unit Tests
104+
image_tag: python:3.5
105+
- Unit Tests:
106+
name: Py36 - Unit Tests
107+
image_tag: python:3.6
108+
- Unit Tests:
109+
name: Py37 - Unit Tests
110+
image_tag: python:3.7
111+
codecov: true
112+
- Entry Point Test:
113+
name: Py35 - Entry Point Test
114+
image_tag: python:3.5
115+
- Entry Point Test:
116+
name: Py36 - Entry Point Test
117+
image_tag: python:3.6
118+
- Entry Point Test:
119+
name: Py37 - Entry Point Test
120+
image_tag: python:3.7

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ lint-tests:
1111
isort --check-only --recursive autonormalize
1212

1313
unit-tests:
14-
pytest --cache-clear --show-capture=stderr -vv
14+
coverage erase
15+
pytest --cov=autonormalize --cache-clear --show-capture=stderr -vv

0 commit comments

Comments
 (0)