-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix coverage gen by not using importlib + add cov uploads to codeclimate
- Loading branch information
1 parent
4f4b8c1
commit 6f5136f
Showing
3 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,21 +85,55 @@ jobs: | |
python -m pip install -r nox-requirements.txt | ||
- name: Run tests | ||
run: | | ||
python -m nox -s test | ||
# mv .coverage ./.coverage.${{ matrix.os }}.${{ matrix.python-version }} | ||
|
||
# - name: Archive coverage | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: coverage | ||
# path: ./.coverage.${{ matrix.os }}.${{ matrix.python-version }} | ||
# if-no-files-found: error | ||
|
||
upload-coverage: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: install prerequisites | ||
run: | | ||
python -m pip install --upgrade pip wheel | ||
python -m pip install -r nox-requirements.txt | ||
- name: Record coverage | ||
run: | | ||
python -m nox -s test-coverage | ||
mv .coverage ./.coverage.${{ matrix.os }}.${{ matrix.python-version }} | ||
- name: Upload coverage | ||
if: github.event_name == 'push' | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageLocations: .coverage.xml:coverage.py | ||
|
||
- name: Archive coverage | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage | ||
path: ./.coverage.${{ matrix.os }}.${{ matrix.python-version }} | ||
path: ./coverage_html | ||
if-no-files-found: error | ||
|
||
# TODO: this needs to be finished at one point | ||
# TODO: Switch over to this style once https://github.com/nedbat/coveragepy/issues/1002 is fixed | ||
# upload-coverage: | ||
# needs: test | ||
# if: Never() | ||
# if: github.event_name == 'push' | ||
# runs-on: ubuntu-latest | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ htmlcov/ | |
.cache | ||
nosetests.xml | ||
coverage.xml | ||
coverage_html | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters