Skip to content

Commit d7623ba

Browse files
authored
coverage in CI (#56)
* coverage in CI * updates circleci orb * circleci
1 parent c55ba04 commit d7623ba

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

.circleci/config.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
version: 2.1
22

33
orbs:
4-
python: circleci/python@0.2.1
4+
python: circleci/python@1.2.1
55

66
jobs:
77
build-and-test:
88
executor: python/default
99
steps:
1010
- checkout
11-
- python/load-cache
12-
- python/install-deps
11+
- run:
12+
command: pip install --user -r requirements.txt
1313
- run:
1414
command: pip install --user -r requirements-dev.txt
15-
- python/save-cache
1615
- run:
1716
command: python -m pybbda.data.tools.update --data-source Lahman --make-dirs
1817
name: Update Lahman
@@ -32,7 +31,7 @@ jobs:
3231
command: make lint
3332
name: Lint
3433
- run:
35-
command: make test
34+
command: make coverage
3635
name: Test
3736
- run:
3837
command: make test-markov

.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
make lint
4444
- name: Test with pytest
4545
run: |
46-
make test
46+
make coverage
4747
- name: Test Markov CLI
4848
run: |
4949
make test-markov

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ test-markov: install
2626
-i 1 henderi01_1982 \
2727
-i 4 ruthba01_1927
2828

29+
coverage: install-dev
30+
python -m pytest --cov=pybbda tests/
31+
2932
test: install-dev
3033
python -m pytest tests/
3134

requirements-dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ black==19.3b0
88
flake8==3.7.8
99
sphinx-rtd-theme==0.4.3
1010
sphinx-gallery==0.7.0
11+
pytest-cov~=2.10.1
12+
pytest-xdist~=2.1.0

0 commit comments

Comments
 (0)