-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Polish the GHA script - Have it run on any PR - Install newest versions of TF, sklearn by default * Fix a syntax error in how we run tests * Fixed some typos Dumb ones not worth recording * Other mistakes - Need Python 3.7 for TF1 - Spelling errors * Test of sklearn 0.19.1 requires Py3.6
- Loading branch information
Showing
2 changed files
with
91 additions
and
100 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 |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
schedule: | ||
# daily testing to occur at 7:30 CST every Monday | ||
- cron: '30 13 * * 1' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
cfg: | ||
- python_version: 3.9 | ||
label: latest libraries | ||
|
||
# Support for legacy methods to save/load models | ||
- python_version: 3.6 | ||
scikit-learn: 0.19.1 | ||
label: sklearn <= 0.19.1 | ||
|
||
# Support for changes in Keras | ||
- python_version: 3.7 | ||
keras-version: 2.1.3 | ||
label: keras-2.1.3 | ||
|
||
- python_version: 3.7 | ||
keras-version: 2.2.3 | ||
label: keras-2.2.3 | ||
|
||
name: "Python ${{ matrix.cfg.python_version }} - ${{ matrix.cfg.label }}" | ||
|
||
env: | ||
CLIENT_ID: ${{ secrets.CLIENT_ID }} | ||
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.cfg.python_version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.cfg.python_version }} | ||
|
||
- name: Globus auth | ||
run: 'echo "$GLOBUS_CONFIG" > ~/.globus-native-apps.cfg' | ||
shell: bash | ||
env: | ||
GLOBUS_CONFIG: "${{ secrets.GLOBUS_CONFIG }}" | ||
|
||
- name: Run Installation Script | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . | ||
pip install flake8 pytest | ||
pip install -r test-requirements.txt | ||
# Adding keras and TF1 for some tests | ||
if [ -n "${{matrix.cfg.keras-version}}" ]; then | ||
pip install keras==${{matrix.cfg.keras-version}} "tensorflow<2" "h5py<3" | ||
else | ||
# Otherwise, use TF2 | ||
pip install "tensorflow>2" | ||
fi | ||
# Manually-specifying the version of scikit-learn | ||
if [ -n "${{matrix.cfg.scikit-learn}}" ]; then | ||
pip install scikit-learn==${{matrix.cfg.scikit-learn}} | ||
fi | ||
# Print out the environment for record-keeping | ||
pip list | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
# run all testing documents, except the local tests | ||
pytest ./dlhub_sdk -k "not test_dlhub_client" |
This file was deleted.
Oops, something went wrong.