Skip to content

Commit

Permalink
move travis -> gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestoarbitrio committed Nov 13, 2020
1 parent 8b07d87 commit ebcc006
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 101 deletions.
1 change: 0 additions & 1 deletion .ci-ignore
Expand Up @@ -2,6 +2,5 @@
docs
setup.py
.pre-commit-config.yaml
.travis.yml
readthedocs.yml
tests
100 changes: 100 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,100 @@
name: CI

on: [push, pull_request]

jobs:

build:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
python-version: [3.6, 3.7]
experimental: [false]
include:
- os: windows-latest
python-version: 3.8
experimental: true
- os: macOS-latest
python-version: 3.8
experimental: false
- os: ubuntu-latest
python-version: 3.8
experimental: false
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install openslide
id: system-dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt install openslide-tools
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install openslide
elif [ "$RUNNER_OS" == "Windows" ]; then
choco install wget
choco install 7zip-zstd
wget https://github.com/openslide/openslide-winbuild/releases/download/v20171122/openslide-win64-20171122.zip -P /c/downloads
7z e /c/downloads/openslide-win64-20171122.zip -aoa
export "PATH=C:/downloads/openslide-win64-20171122/bin:$PATH"
else
echo "$RUNNER_OS not supported"
exit 1
fi
shell: bash
- name: Install dependencies
id: python-dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[testing]
python -m pip install flake8
python -m pip install pooch
- name: Lint with flake8
id: flake8
run: |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
- name: Test with pytest
id: tests
run: |
python -m pytest --ignore=tests/benchmarks
- name: Slack Notification
uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()

coveralls:
needs: build
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install openslide
run: sudo apt install openslide-tools
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[testing]
python -m pip install flake8
python -m pip install pooch
- name: Test with pytest
run: python -m pytest --ignore=tests/benchmarks --cov=histolab
- name: Coveralls
run: coveralls





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

This file was deleted.

0 comments on commit ebcc006

Please sign in to comment.