Skip to content

Commit

Permalink
Use GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Apr 3, 2020
1 parent cf1c976 commit 8e05f71
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 132 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: ci

on:
push:
branches:
- master
pull_request:

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
pip install .[all]
- name: Flake8
run: |
pip install hacking
flake8 .
- name: Black and Mypy
run: |
pip install black mypy
black --check .
mypy -p imgviz --ignore-missing-imports
if: matrix.python-version == '3.8'
- name: Test
run: |
pip install pytest
pytest -v tests
env:
MPLBACKEND: agg
- name: Examples
run: |
python getting_started.py
for f in examples/*.py; do
if [ -x $f ]; then
$f --save
fi
done
env:
MPLBACKEND: agg
- name: Install from dist
run: |
python setup.py sdist
pip install dist/*.tar.gz
- name: Update README.md
if: matrix.python-version == '3.8' && github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
./generate_readme.py > README.md
git config --global user.email "www.kentaro.wada@gmail.com"
git config --global user.name "Kentaro Wada"
git add README.md
git diff-index --cached --quiet HEAD || git commit -m "Update README.md"
git push origin master
68 changes: 0 additions & 68 deletions .travis.sh

This file was deleted.

37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .travis_push.sh

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include README.md
include requirements.txt
recursive-include imgviz/data *
1 change: 0 additions & 1 deletion tests/draw_tests/test_rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ def test_rectangle():
res = imgviz.draw.rectangle(img, (0, 0), (50, 50), outline=(0, 0, 0))
assert res.shape == img.shape
assert res.dtype == img.dtype
assert not np.allclose(img, res)

0 comments on commit 8e05f71

Please sign in to comment.