Skip to content

Commit

Permalink
chore: updated circleci scripts #58
Browse files Browse the repository at this point in the history
  • Loading branch information
itisallgood committed Mar 23, 2020
1 parent 0836523 commit 796bb6b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

- restore_cache:
keys:
- v1-dependencies-{{ checksum "Pipfile.lock" }}
- v1-dependencies-{{ checksum "poetry.lock" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

Expand All @@ -72,8 +72,8 @@ jobs:
name: Run tests and create a Report
command: |
mkdir test-reports
coverage run -m py.test
coverage xml
poetry run create-coverage
poetry run codecov-report
- save_cache:
key: v1-dependencies-{{ checksum "poetry.lock" }}
Expand Down
9 changes: 9 additions & 0 deletions apps/core/scripts/poetry_scripts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import os


def coverage_report():
os.system("coverage run -m py.test")


def coverage_xml():
os.system("coverage xml")
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ pytest-sugar = "^0.9.2"
pytest-env = "^0.6.2"


[tool.poetry.scripts]
create-coverage = "apps.core.scripts:coverage_report"
codecov-report = "apps.core.scripts:coverage_xml"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

0 comments on commit 796bb6b

Please sign in to comment.