Skip to content

Commit

Permalink
configure coveralls orb in circle ci (#74)
Browse files Browse the repository at this point in the history
* configure coveralls orb in circle ci

* trigger test rerun

* exclude plot folder from coverage reporting

* fix tab indent

* fix coverage command

* try to setup covearge omit files in setup.cfg

* move the exclusion config to pyproject

---------

Co-authored-by: Xiangyu Wang <[email protected]>
  • Loading branch information
wwrechard and Xiangyu Wang authored Aug 13, 2024
1 parent 563ac6e commit 9f63822
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: 2.1

orbs:
coveralls: coveralls/[email protected]
python: circleci/[email protected]

# Define a job to be invoked later in a workflow.
Expand All @@ -25,6 +26,7 @@ jobs:
python -m unittest discover
python -m unittest tests/tuner/test*.py
coverage run --source . -m unittest discover
- coveralls/upload
build-and-test-3-9:
docker:
- image: cimg/python:3.9
Expand All @@ -44,6 +46,7 @@ jobs:
python -m unittest discover
python -m unittest tests/tuner/test*.py
coverage run --source . -m unittest discover
- coveralls/upload
build-and-test-3-10:
docker:
- image: cimg/python:3.10
Expand All @@ -63,6 +66,7 @@ jobs:
python -m unittest discover
python -m unittest tests/tuner/test*.py
coverage run --source . -m unittest discover
- coveralls/upload
build-and-test-3-11:
docker:
- image: cimg/python:3.11
Expand All @@ -82,8 +86,9 @@ jobs:
python -m unittest discover
python -m unittest tests/tuner/test*.py
coverage run --source . -m unittest discover
- coveralls/upload

# Invoke jobs via workflows
# Invoke jobs via workflows.
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
sample:
Expand Down
10 changes: 9 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
[tool.setuptools_scm]

[tool.coverage.run]
omit = [
# Omit reproting coverage on tests files
"tests/*",
# Omit plot functions
"pydlm/plot/*",
]

0 comments on commit 9f63822

Please sign in to comment.