Skip to content

Commit

Permalink
Update dependencies and python (MLBazaar#211)
Browse files Browse the repository at this point in the history
* update python versions and dependencies

* Add github workflows, update tox environments and updated travis

* Travis update

* Update dependancies and improve Makefile

* Remove macOS from minimum and lint tests

Co-authored-by: Carles Sala <[email protected]>
  • Loading branch information
pvk-developer and csala authored Nov 20, 2020
1 parent 44119bb commit d61ad4a
Show file tree
Hide file tree
Showing 11 changed files with 317 additions and 103 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Generate Docs

on:
push:
branches: [ stable ]

jobs:

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Python
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Build
run: |
sudo apt-get install swig pandoc
python -m pip install --upgrade pip
pip install -e .[dev]
make docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{secrets.GITHUB_TOKEN}}
publish_dir: docs/_build/html
109 changes: 109 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Run Tests

on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]

jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest]
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 dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox -e lint

readme:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest, macos-latest]
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 dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox -e readme

unit:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest, macos-latest]
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 dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox -e unit

minimum:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest]
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 swig
run: |
sudo apt-get install swig
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox -e minimum

tutorials:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest]
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 swig
run: |
sudo apt-get install swig
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox -e tutorials
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ instance/
# Sphinx documentation
docs/_build/
docs/api/
docs/tutorials/

# PyBuilder
target/
Expand Down
35 changes: 12 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,22 @@
dist: bionic
language: python
python:
- 3.5
- 3.6
- 3.7
- 3.8
env:
- TOXENV=lint
- TOXENV=readme
- TOXENV=unit
- TOXENV=minimum
- TOXENV=tutorials

# Command to install dependencies
addons:
apt:
packages:
- pandoc
- swig

# Command to install dependencies
install: pip install -U tox-travis codecov
install:
- sudo apt-get update
- sudo apt-get install pandoc swig
- pip install -U tox-travis codecov

after_success: codecov

# Command to run tests
script: tox

deploy:

- provider: pages
skip-cleanup: true
github-token: "$GITHUB_TOKEN"
keep-history: true
local-dir: docs/_build/html
target-branch: gh-pages
on:
branch: master
python: 3.6
scropt: travis_wait 60 tox
Loading

0 comments on commit d61ad4a

Please sign in to comment.