Skip to content

Commit

Permalink
Merge pull request #246 from s-weigand/use-github-actions
Browse files Browse the repository at this point in the history
use gh actions for testing
  • Loading branch information
jsnel authored Nov 14, 2019
2 parents 2321217 + 34141c7 commit fab6f1c
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 2 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/CI_CD_actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Python package

on: [push]

jobs:
lint:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Lint with flake8
run: |
flake8 glotaran
docs:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install -r requirements_dev.txt
- name: Build docs
run: |
make --directory=docs clean html
docs-links:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install -r requirements_dev.txt
- name: Check doc links
run: |
make --directory=docs clean linkcheck
test:
runs-on: ${{ matrix.os }}
needs: [lint, docs]
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: [3.6, 3.7]

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 -r requirements_dev.txt
- name: Run tests
run: |
py.test --cov=glotaran --cov-config .coveragerc glotaran
deploy:
runs-on: [ubuntu-latest]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
needs: test
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
- name: Build dist
run: |
python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
pyGloTarAn is a python library for global and target analysis

[![latest release](https://pypip.in/version/glotaran/badge.svg)](https://pypi.org/project/glotaran/)
[![Build Status Linux + OsX](https://travis-ci.org/glotaran/pyglotaran.svg?branch=master)](https://travis-ci.org/glotaran/pyglotaran)
[![Build Status Windows](https://ci.appveyor.com/api/projects/status/76gkx10wyn2cd049?svg=true)](https://ci.appveyor.com/project/glotaran/pyglotaran)
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fglotaran%2Fpyglotaran%2Fbadge&style=popout)](https://actions-badge.atrox.dev/glotaran/pyglotaran/goto)
[![Documentation Status](https://readthedocs.org/projects/glotaran/badge/?version=latest)](https://glotaran.readthedocs.io/en/latest/?badge=latest)
[![Coverage Status](https://coveralls.io/repos/github/glotaran/pyglotaran/badge.svg?branch=master)](https://coveralls.io/github/glotaran/pyglotaran?branch=master)

Expand Down

0 comments on commit fab6f1c

Please sign in to comment.