Repository navigation
replace Travis CI with GitHub actions - #52
Conversation
Codecov Report
@@ Coverage Diff @@
## master #52 +/- ##
==========================================
+ Coverage 56.53% 56.64% +0.11%
==========================================
Files 12 13 +1
Lines 375 376 +1
Branches 47 47
==========================================
+ Hits 212 213 +1
Misses 160 160
Partials 3 3
Continue to review full report at Codecov.
|
6f4e45b to
c876c08
Compare
|
I am not sure why coverage looks so abysmal. Otherwise this seems to work. |
|
The docs build action will only run when it is merged into master. |
IAlibay
left a comment
There was a problem hiding this comment.
Couple of comments but nothing blocking so I'll approve.
| os: [ubuntu-latest, macOS-latest, windows-latest] | ||
| python-version: [2.7, 3.6, 3.7, 3.8, 3.9] | ||
| exclude: | ||
| - os: macOS-latest |
There was a problem hiding this comment.
the exclude here is weird, I guess you're only testing 3.8 and 2.7 on macOS and Windows? It might be a bit simpler to just not have these in the main matrix and just add them as includes (4 entries instead of 6 in exclude)
| python -m pip install wheel | ||
| python -m pip install pytest pytest-cov pytest-pep8 pytest-mock codecov | ||
|
|
||
| - name: Install main dependencies |
There was a problem hiding this comment.
any reason for having the two separate parts of the workflow and not just squashing everything into the one step?
There was a problem hiding this comment.
Mainly because I like the semantics of clearly seeing where something for tests only is done vs what's needed for running the package — I often look at the CI files to figure out what's actually needed as opposed to what someone might or might not have put into setup.py.
ee61e44 to
f801946
Compare
- Tests only (gratuitously expanded to MacOS and Windows), gh-ci.yml - add docs action - install pathlib2 for 2.7 - updated supported Python versions in setup.py (2.7, 3.6-3.9)
- use pathlib for OS-agnostic path comparisons - install pathlib2 in setup.py for Python 2.7
Ensure that CRLF/LF line endings do not matter for tests. Fixed sha256 test, which incorrectly wrote a text file instead of binary.
f801946 to
a092e30
Compare
|
Coverage is getting annoying on GitHub actions: I got the error and following https://stackoverflow.com/a/60579142 I added I am not sure if it's trying to run the package from the sources instead from the proper installation. |
|
The author tests work just fine if there is no What exactly do pytest and coverage look for and where??? |
|
The only way I managed to solve the issue of getting both pytest and coverage to work was to use an in-place installation (Seems a sub-par solution but for right now I take it and I am eager to hear better solutions and will happily implement them.) |
- add tests/__init__.py to coax pytest-cov to report coverage
"CoverageWarning: No data was collected. (no-data-collected)"
is supposedly fixed with this empty
__init__.py (see https://stackoverflow.com/a/60579142)
- inplace-installation so that coverage and pytest work with generated authors.py
(with standard installation AND the tests/__init__.py, pytest picks up the local sources
that does not contain the generated authors.py and fails)
1631093 to
4572c0c
Compare
|
https://stackoverflow.com/questions/20292950/making-py-test-coverage-and-tox-work-together-init-py-in-tests-folder seems to have some links for follow-up reading. |
fix #48