Skip to content

Commit 3ae6802

Browse files
authored
Merge pull request #412 from mpsonntag/dev
Introducing github actions LGTM
2 parents 77392b4 + 1a0de4b commit 3ae6802

File tree

5 files changed

+63
-23
lines changed

5 files changed

+63
-23
lines changed

.github/workflows/run-tests.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: run-tests
2+
on:
3+
# test cron by running it once a day at 01:00
4+
schedule:
5+
- cron: '0 1 * * *'
6+
push:
7+
branches:
8+
- master
9+
- dev
10+
pull_request:
11+
branches:
12+
- master
13+
jobs:
14+
tests:
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, macos-latest, windows-latest]
19+
python-version: [3.6, 3.7, 3.8, 3.9]
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Setup Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Display Python version
27+
run: python -c "import sys; print(sys.version)"
28+
- name: Install dependencies
29+
run: |
30+
python setup.py install
31+
pip install -r requirements-test.txt
32+
- name: Run tests
33+
run: pytest
34+
run-coverall:
35+
runs-on: [ubuntu-latest]
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Setup Python 3.8
39+
uses: actions/setup-python@v2
40+
with:
41+
python-version: "3.8"
42+
- name: Display Python version
43+
run: python -c "import sys; print(sys.version)"
44+
- name: Install dependencies
45+
run: |
46+
python setup.py install
47+
pip install -r requirements-test.txt
48+
pip install pytest coveralls
49+
- name: Create coverage
50+
run: |
51+
coverage run --source=odml -m pytest test/
52+
- name: Submit to coveralls
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
run: coveralls --service=github

.travis.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,10 @@ dist: trusty
44
language: python
55

66
matrix:
7-
allow_failures:
8-
- os: linux
9-
python: "3.9-dev"
10-
dist: bionic
11-
127
include:
13-
- os: linux
14-
python: "3.5"
15-
- os: linux
16-
python: "3.6"
17-
env: COVERALLS=1
18-
- os: linux
19-
python: "3.7"
20-
dist: xenial
218
- os: linux
229
python: "3.8"
2310
dist: xenial
24-
- os: linux
25-
python: "3.9-dev"
26-
dist: bionic
2711

2812
install:
2913
- export PYVER=${TRAVIS_PYTHON_VERSION:0:1}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Travis build](https://travis-ci.org/G-Node/python-odml.svg?branch=master)](https://travis-ci.org/G-Node/python-odml)
1+
[![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)
22
[![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)
33
[![Test coverage](https://coveralls.io/repos/github/G-Node/python-odml/badge.svg?branch=master)](https://coveralls.io/github/G-Node/python-odml)
44
[![PyPI version](https://img.shields.io/pypi/v/odml.svg)](https://pypi.org/project/odML/)

requirements-test.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pytest
2+
owlrl
3+
requests

setup.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import json
22
import os
3-
import sys
43

54
try:
65
from setuptools import setup
@@ -30,12 +29,11 @@
3029
with open('README.md') as f:
3130
description_text = f.read()
3231

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

35-
tests_req = ["owlrl", "requests"]
36-
37-
if sys.version_info < (3, 4):
38-
install_req += ["enum34"]
36+
tests_req = ["pytest", "owlrl", "requests"]
3937

4038
setup(
4139
name='odML',

0 commit comments

Comments
 (0)