Skip to content

Commit 418041b

Browse files
committed
Add CI
1 parent ebf6a64 commit 418041b

File tree

4 files changed

+92
-0
lines changed

4 files changed

+92
-0
lines changed

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[run]
2+
omit = tests/*,setup.py,amimspy/__main__.py

.github/workflows/build-test.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: amimspy
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, macos-latest]
12+
python-version: [3.7, 3.8]
13+
14+
env:
15+
OS: ${{ matrix.os }}
16+
PYTHON: ${{ matrix.python-version }}
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Setup conda - Python ${{ matrix.python-version }}
22+
uses: s-weigand/setup-conda@v1
23+
with:
24+
update-conda: true
25+
python-version: ${{ matrix.python-version }}
26+
conda-channels: conda-forge, bioconda
27+
28+
- name: Install dependencies
29+
run: |
30+
31+
python --version
32+
conda env update --file environment.yml --name base
33+
34+
- name: Lint with flake8
35+
run: |
36+
37+
conda install flake8
38+
39+
# stop build if there are Python syntax errors or undefined names
40+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
41+
42+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
43+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
44+
45+
- name: Test with pytest-cov
46+
run: |
47+
48+
python setup.py install
49+
amimspy --help
50+
51+
conda install pytest codecov pytest-cov -c conda-forge
52+
pytest --cov ./ --cov-config=.coveragerc --cov-report=xml
53+
54+
- name: Upload code coverage to codecov
55+
uses: codecov/codecov-action@v1
56+
with:
57+
flags: unittests
58+
env_vars: OS,PYTHON
59+
fail_ci_if_error: true
60+
verbose: true

appveyor.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
build: false
2+
3+
environment:
4+
matrix:
5+
- PYTHON_VERSION: 3.7
6+
MINICONDA: C:\Miniconda-x64
7+
8+
init:
9+
- "ECHO %PYTHON_VERSION% %MINICONDA%"
10+
11+
install:
12+
- "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
13+
- conda config --set always_yes yes --set changeps1 no
14+
- conda update -q conda
15+
- conda info -a
16+
- conda env create -n test-environment -f environment.yml
17+
- activate test-environment
18+
- conda install pytest -c conda-forge
19+
- pip install .
20+
21+
test_script:
22+
- amimspy --help
23+
- pytest

environment.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: amimspy
2+
channels:
3+
- conda-forge
4+
- bioconda
5+
dependencies:
6+
- python=3.7
7+
- dimspy=2.0.0

0 commit comments

Comments
 (0)