Skip to content

Commit

Permalink
set up github actions to run tests, #43
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwigway committed Sep 24, 2020
1 parent 34eb331 commit 0ba98cd
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# run the linter and tests
# copied and lightly edited from https://docs.github.com/en/actions/guides/building-and-testing-python

name: eqsormo

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# only supporting py 3.7/3.8
python-version: [3.7, 3.8]

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 dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install -r requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
statsmodels>=0.11
tqdm>=4.0
numba>=0.51
numpy>=1.0
pandas>=1.0
dill>=0.3
scipy>=1.5

0 comments on commit 0ba98cd

Please sign in to comment.