Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add continuous integration unit testing through GH Actions #160

Merged
merged 15 commits into from
Mar 6, 2021

Conversation

jdebacker
Copy link
Member

This PR added a GH Action to run unit tests on pushes.

I have a work in progress label because I can't get unit tests to run locally. I just rebuilt the toxbrain-dev environment and when I run pytest, I get:

(taxbrain-dev) jason.debacker@JDEBACKER taxbrain % pytest
Traceback (most recent call last):
  File "/Users/jason.debacker/anaconda3/envs/taxbrain-dev/bin/pytest", line 7, in <module>
    from py.test import console_main
  File "/Users/jason.debacker/anaconda3/envs/taxbrain-dev/lib/python3.8/site-packages/py/_vendored_packages/apipkg/__init__.py", line 199, in __getattribute__
    return getattr(getmod(), name)
  File "/Users/jason.debacker/anaconda3/envs/taxbrain-dev/lib/python3.8/site-packages/py/_vendored_packages/apipkg/__init__.py", line 183, in getmod
    x = importobj(modpath, None)
  File "/Users/jason.debacker/anaconda3/envs/taxbrain-dev/lib/python3.8/site-packages/py/_vendored_packages/apipkg/__init__.py", line 72, in importobj
    module = __import__(modpath, None, None, ['__doc__'])
  File "/Users/jason.debacker/anaconda3/envs/taxbrain-dev/lib/python3.8/site-packages/pytest/__init__.py", line 5, in <module>
    from _pytest.assertion import register_assert_rewrite
  File "/Users/jason.debacker/anaconda3/envs/taxbrain-dev/lib/python3.8/site-packages/_pytest/assertion/__init__.py", line 9, in <module>
    from _pytest.assertion import rewrite
  File "/Users/jason.debacker/anaconda3/envs/taxbrain-dev/lib/python3.8/site-packages/_pytest/assertion/rewrite.py", line 34, in <module>
    from _pytest.assertion import util
  File "/Users/jason.debacker/anaconda3/envs/taxbrain-dev/lib/python3.8/site-packages/_pytest/assertion/util.py", line 13, in <module>
    import _pytest._code
  File "/Users/jason.debacker/anaconda3/envs/taxbrain-dev/lib/python3.8/site-packages/_pytest/_code/__init__.py", line 2, in <module>
    from .code import Code
  File "/Users/jason.debacker/anaconda3/envs/taxbrain-dev/lib/python3.8/site-packages/_pytest/_code/code.py", line 942, in <module>
    @attr.s(eq=False)
TypeError: attrs() got an unexpected keyword argument 'eq'

Once I am able to confirm tests run locally, I'll remove the WIP label.

@jdebacker
Copy link
Member Author

Also, this PR would replace PR #22. I think GH Actions is a better solution than Travis at this point.

@jdebacker
Copy link
Member Author

Ok, solved error above which was due to a deprecated version of a package that was installed due to package conflicts. Removing the pdflatex dependency, which was never imported in any module, solved this.

All tests (including Compute Studio app tests) are passing locally for me. Looking into why failures on the GH Action.

@jdebacker jdebacker changed the title [WIP] Add continuous integration unit testing through GH Actions Add continuous integration unit testing through GH Actions Feb 26, 2021
@jdebacker
Copy link
Member Author

Took a few tries to figure out how to properly install texlive properly on the virtual machine, but this PR now ready for your review @andersonfrailey.

@codecov-io
Copy link

codecov-io commented Feb 26, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@5238a59). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #160   +/-   ##
=========================================
  Coverage          ?   81.83%           
=========================================
  Files             ?       21           
  Lines             ?     1448           
  Branches          ?        0           
=========================================
  Hits              ?     1185           
  Misses            ?      263           
  Partials          ?        0           
Flag Coverage Δ
unittests 81.83% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5238a59...c0c004e. Read the comment docs.

@jdebacker
Copy link
Member Author

@hdoupe Thanks for suggestion - one line worked!

@hdoupe
Copy link
Collaborator

hdoupe commented Feb 26, 2021

@hdoupe Thanks for suggestion - one line worked!

Awesome, thanks for stepping up and figuring out how to get this to work.

@jdebacker
Copy link
Member Author

This PR addresses Issue #106

@andersonfrailey andersonfrailey added the enhancement New feature or request label Mar 6, 2021
@andersonfrailey
Copy link
Collaborator

Thanks for working on this, @jdebacker! LGTM. Merging.

@andersonfrailey andersonfrailey merged commit adee93f into PSLmodels:master Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants