Skip to content

Commit

Permalink
Merge pull request #283 from greco-project/feature/add_coveralls_test…
Browse files Browse the repository at this point in the history
…_coverage

Feature/add coveralls test coverage
  • Loading branch information
SabineHaas authored Apr 15, 2021
2 parents e60daa4 + d35f20c commit b8a0a0a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
11 changes: 9 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[run]
omit = tests/*
source = pvcompare
source =
pvcompare
omit =
pvcompare/cpv/inputs.py
pvcompare/perosi/data/*

[report]
show_missing = true
precision = 2
16 changes: 14 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: Set env for dev branch
if: endsWith(github.ref, '/develop')
Expand Down Expand Up @@ -67,4 +68,15 @@ jobs:
- name: Test with pytest
run: |
coverage run --rcfile=.coveragerc --source pvcompare -m py.test
coverage run -m pytest tests/
- name: Check test coverage
run: |
coverage report -m
- name: Report to coveralls
run: |
coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Here is a template for new release sections
### Fixed
- fix PV costs parameters and PSI lifetime (#273)
- fix number of houses to 20 (8 flats per storey makes 40 flats per house with 5 storeys, makes 800 in total (and 480 for 3 storeys)) (#273)
- Test coverage is now automatically checked with github actions and [coveralls](https://coveralls.io/github/greco-project/pvcompare) (#283)

# Hot fixes
- Hot fix: install MVS with option `[report]` to install missing packages (#270)
- Hot fix: remove build for python 3.6 from `main.yml` github actions workflow (#270)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def read(fname):
"dev": [
"pytest==5.3.5",
"black==19.10b0",
"coverage==5.0.3",
"coveralls==1.11.0",
"coverage",
"coveralls",
"sphinx_rtd_theme",
]
},
Expand Down

0 comments on commit b8a0a0a

Please sign in to comment.