Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GitHub Actions] Setup Tests via Github Actions #561

Merged
merged 19 commits into from
Jan 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[run]
# relative_files = True is necessary as per documentation of
# https://github.com/AndreMiras/coveralls-python-action
relative_files = True
source = quantecon
omit =
*/python?.?/*
Expand Down
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: continuous-integration

# We ignore Python 3.7 on windows-latest because 3 tests are failing:
# - FAIL: test_quadrect_2d_H (quantecon.tests.test_quad.TestQuadrect)
# AssertionError:
# Not equal to tolerance rtol=1e-07, atol=0
# - FAIL: test_quadrect_2d_H2 (quantecon.tests.test_quad.TestQuadrect)
# AssertionError:
# Not equal to tolerance rtol=1e-07, atol=0
# - The last error can't be found from the log
#
# Run this occasionally to test performance:
# nosetests -a "slow"

on:
push:
branches:
- master
pull_request:

jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: [3.7, 3.8]
exclude:
- os: windows-latest
python-version: 3.7
steps:
- uses: actions/checkout@v2
- 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 -U nose coverage numpy scipy pandas numba sympy ipython statsmodels flake8
pip install tables
python setup.py install
- name: Run Tests
run: |
flake8 --select F401, F405,E231 quantecon
nosetests --with-coverage -a "!slow" --cover-package=quantecon
- name: Coveralls Parallel
uses: AndreMiras/coveralls-python-action@develop
if: runner.os == 'Linux'
with:
flag-name: run-${{ matrix.test_number }}
parallel: true
coveralls_finish:
needs: tests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
59 changes: 0 additions & 59 deletions .travis.yml

This file was deleted.