-
Notifications
You must be signed in to change notification settings - Fork 486
Add GitHub Actions for Python unit tests #1677
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
Changes from all commits
4036c13
2c8bdf7
26bcd39
6965d3a
a286ca2
f58b470
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Python Test | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Install Packages | ||
run: | | ||
pip install grpcio-testing==1.40.0 | ||
pip install pytest==5.1.2 | ||
|
||
pip install -r cmd/suggestion/chocolate/v1beta1/requirements.txt | ||
pip install -r cmd/suggestion/hyperopt/v1beta1/requirements.txt | ||
pip install -r cmd/suggestion/skopt/v1beta1/requirements.txt | ||
pip install -r cmd/suggestion/optuna/v1beta1/requirements.txt | ||
pip install -r cmd/suggestion/nas/enas/v1beta1/requirements.txt | ||
pip install -r cmd/suggestion/hyperband/v1beta1/requirements.txt | ||
pip install -r cmd/suggestion/nas/darts/v1beta1/requirements.txt | ||
|
||
pip install -r cmd/earlystopping/medianstop/v1beta1/requirements.txt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM, maybe in the future we can introduce the python site-packages cache to accelerate the building process. |
||
|
||
- name: Run Python test | ||
run: | | ||
export PYTHONPATH=$(pwd):$(pwd)/pkg/apis/manager/v1beta1/python:$(pwd)/pkg/apis/manager/health/python | ||
echo $PYTHONPATH | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could we remove this line after debugging? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice catch. I will address your comments in the following PR. |
||
pytest ./test/unit/v1beta1/suggestion | ||
pytest ./test/unit/v1beta1/earlystopping |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about make a
requirements.txt
including this packages at the source root directory ?