Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more CI testing via github actions (#130)
* Add more CI testing via github actions * Fix yml * Add missing run statements * Remove quotes * Proper pytorch version * Remove MAC OS build * Support only new pytorch versions * Support only new pytorch versions * Remove pillow dependency * Remove fastprogress dependency * Fix pillow version * Fix pillow version * Revamp the readme
- Loading branch information
Showing
8 changed files
with
181 additions
and
22 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,53 @@ | ||
name: CI Testing | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-18.04, windows-2019] | ||
python-version: [3.6, 3.7] | ||
pytorch-version: [1.2, 1.3, 1.4, 'nightly'] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Pytorch 1.2 | ||
if: matrix.pytorch-version == 1.2 | ||
run: | | ||
pip install Pillow==6.1 | ||
pip install torch==1.2.0+cpu torchvision==0.4.0+cpu -f https://download.pytorch.org/whl/torch_stable.html | ||
- name: Install Pytorch 1.3 | ||
if: matrix.pytorch-version == 1.3 | ||
run: | | ||
pip install Pillow==6.1 | ||
pip install torch==1.3.1+cpu torchvision==0.4.2+cpu -f https://download.pytorch.org/whl/torch_stable.html | ||
- name: Install Pytorch 1.4 | ||
if: matrix.pytorch-version == 1.4 | ||
run: pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html | ||
- name: Install Pytorch Nightly | ||
if: matrix.pytorch-version == 'nightly' | ||
run: pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install scipy | ||
- name: Lint with flake8 | ||
run: | | ||
pip install flake8 | ||
# 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=79 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pip install pytest | ||
pytest |
24 changes: 18 additions & 6 deletions
24
.github/workflows/pythonpackage.yml → .github/workflows/ci_testing_mac.yml
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
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,26 @@ | ||
name: Automatic Rebase | ||
# https://github.com/marketplace/actions/automatic-rebase | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
jobs: | ||
rebase: | ||
name: Rebase | ||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
- name: Automatic Rebase | ||
uses: cirrus-actions/rebase@1.2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# https://github.community/t5/GitHub-Actions/Workflow-is-failing-if-no-job-can-be-ran-due-to-condition/m-p/38186#M3250 | ||
always_job: | ||
name: Always run job | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Always run | ||
run: echo "This job is used to prevent the workflow to fail when all other jobs are skipped." |
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
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,16 @@ | ||
[tool.black] | ||
line-length = 79 | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
/( | ||
\.git | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
)/ | ||
''' |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
numpy | ||
pillow>=6.2.0 | ||
fastprogress==0.1.20 | ||
pillow | ||
scipy | ||
torch>=1.2 | ||
torchvision>=0.4 |
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
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