GitHub Action for Linux Unit Tests#2013
Conversation
# Conflicts: # .github/workflows/linux_unit_tests.yml # test-requirements.txt
freddyaboulton
left a comment
There was a problem hiding this comment.
@ParthivNaresh Awesome! This is super exciting. I have some questions on the implementation but nothing blocking.
| - if: ${{ matrix.core_dependencies }} | ||
| name: Installing Core Dependencies | ||
| run: | | ||
| pip install virtualenv |
There was a problem hiding this comment.
How come we install virtualenv in every step?
There was a problem hiding this comment.
I was running into some errors a while back about the virtualenv not being carried forward between steps but I'll try again and see what happens.
| - python_version: "3.8" | ||
| core_dependencies: false | ||
| codecov: true | ||
| - python_version: "3.8" |
There was a problem hiding this comment.
I think we're missing python 3.9 core dependecies False?
There was a problem hiding this comment.
Great point thanks!
There was a problem hiding this comment.
Didn't see the core_dependencies=False for 3.9
| nbval==0.9.3 | ||
| IPython>=5.0.0 | ||
| codecov==2.1.0 | ||
| codecov==2.1.11 |
There was a problem hiding this comment.
Is this version needed to upload the report?
There was a problem hiding this comment.
2.1.6 adds more support for GitHub Actions and 2.1.11 adds Python 3.9 support!
| pip install --upgrade pip -q | ||
| pip install -e . --no-dependencies | ||
| pip install -r core-requirements.txt | ||
| pip install -r test-requirements.txt |
There was a problem hiding this comment.
I can't remember why we didn't create a Makefile target for installing coredeps, like make installdeps-core 🤷♂️
| pip install -r core-requirements.txt | ||
| pip install -r test-requirements.txt | ||
| # "!" negates return code. exit nonzero if any of these deps are found | ||
| ! pip freeze | grep -E "xgboost|catboost|lightgbm|plotly|ipywidgets|category_encoders" |
There was a problem hiding this comment.
Do you think this check will still work for GH actions instead of circleci?
Quick test would be: create a do-not-merge copy of your PR, add pip install lightgbm above this line and make sure the job fails on that PR.
There was a problem hiding this comment.
Failed successfully
https://github.com/alteryx/evalml/runs/2256828700?check_suite_focus=true
dsherry
left a comment
There was a problem hiding this comment.
LGTM! Lmk when you're ready to update branch protections @ParthivNaresh ⚔️ 🤺
bchen1116
left a comment
There was a problem hiding this comment.
LGTM! Thanks for updating and cleaning our test code!
| - python_version: "3.8" | ||
| core_dependencies: false | ||
| codecov: true | ||
| - python_version: "3.8" |
There was a problem hiding this comment.
Didn't see the core_dependencies=False for 3.9
| virtualenv test_python -q | ||
| source test_python/bin/activate | ||
| pip install coverage | ||
| bash <(curl -s https://codecov.io/bash) -C ${{ github.event.pull_request.head.sha }} |
There was a problem hiding this comment.
Ah nice, so this was the SHA which fixed the issue. Sweet!
| .PHONY: installdeps-core | ||
| installdeps-core: | ||
| pip install -e . -q | ||
| pip install -r core-requirements.txt -q |

Fixes #1911
Using this to close out #1911 which was raised to find a way to upload a codecov report for test coverage.
Here is the Linux Unit Test GitHub Action: https://github.com/alteryx/evalml/runs/2254366693?check_suite_focus=true
Here's the uploaded report: https://codecov.io/gh/alteryx/evalml/tree/9bdba6c299d517dab05ecc35dd79f0272148333b/evalml
For comparative review, here is a PR raised to see how this Action behaves when a large number of
model_understandingtests have been removed, thereby reducing code coverage: #2012