Skip to content

Commit

Permalink
Merge pull request #412 from mpsonntag/dev
Browse files Browse the repository at this point in the history
Introducing github actions

LGTM
  • Loading branch information
achilleas-k committed Feb 10, 2021
2 parents 77392b4 + 1a0de4b commit 3ae6802
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 23 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: run-tests
on:
# test cron by running it once a day at 01:00
schedule:
- cron: '0 1 * * *'
push:
branches:
- master
- dev
pull_request:
branches:
- master
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python setup.py install
pip install -r requirements-test.txt
- name: Run tests
run: pytest
run-coverall:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python setup.py install
pip install -r requirements-test.txt
pip install pytest coveralls
- name: Create coverage
run: |
coverage run --source=odml -m pytest test/
- name: Submit to coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github
16 changes: 0 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,10 @@ dist: trusty
language: python

matrix:
allow_failures:
- os: linux
python: "3.9-dev"
dist: bionic

include:
- os: linux
python: "3.5"
- os: linux
python: "3.6"
env: COVERALLS=1
- os: linux
python: "3.7"
dist: xenial
- os: linux
python: "3.8"
dist: xenial
- os: linux
python: "3.9-dev"
dist: bionic

install:
- export PYVER=${TRAVIS_PYTHON_VERSION:0:1}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Travis build](https://travis-ci.org/G-Node/python-odml.svg?branch=master)](https://travis-ci.org/G-Node/python-odml)
[![gh actions tests](https://github.com/G-Node/python-odml/workflows/run-tests/badge.svg?branch=master)](https://github.com/G-Node/python-odml/actions)
[![Build status](https://ci.appveyor.com/api/projects/status/br7pe6atlwdg5618/branch/master?svg=true)](https://ci.appveyor.com/project/G-Node/python-odml/branch/master)
[![Test coverage](https://coveralls.io/repos/github/G-Node/python-odml/badge.svg?branch=master)](https://coveralls.io/github/G-Node/python-odml)
[![PyPI version](https://img.shields.io/pypi/v/odml.svg)](https://pypi.org/project/odML/)
Expand Down
3 changes: 3 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest
owlrl
requests
10 changes: 4 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import json
import os
import sys

try:
from setuptools import setup
Expand Down Expand Up @@ -30,12 +29,11 @@
with open('README.md') as f:
description_text = f.read()

install_req = ["lxml", "pyyaml>=5.1", "rdflib", "docopt", "pathlib"]
# pyparsing needs to be pinned to 2.4.7 for the time being. setup install fetches a pre-release
# package that currently results in issues with the rdflib library.
install_req = ["lxml", "pyyaml>=5.1", "rdflib", "docopt", "pathlib", "pyparsing==2.4.7"]

tests_req = ["owlrl", "requests"]

if sys.version_info < (3, 4):
install_req += ["enum34"]
tests_req = ["pytest", "owlrl", "requests"]

setup(
name='odML',
Expand Down

0 comments on commit 3ae6802

Please sign in to comment.