Skip to content

Commit 128ed39

Browse files
rhtHarveyt47mmcky
authored
[GitHub Actions] Setup Tests via Github Actions (QuantEcon#561)
* creating test.yml still need to add test changes for this to work * testing addition of coveralls * add coveralls token * edit token * edit token 2 * migrate to GitHub Actions secrets * remove duplicate testing on push and PR * Test new Coveralls set up Using similar set up as to [here](https://github.com/marketplace/actions/coveralls-github-action) * removing `flag-name` input * Remove .coveralls.yml * GA: Remove Python 3.6 from the build matrix Otherwise, scipy returns this error during installation: RuntimeError: Python version >= 3.7 required. * GA: Use nose to run the tests * Use AndreMiras' version of Coveralls action According to coverallsapp/github-action#4 (comment), this version works, unlike the official https://github.com/marketplace/actions/coveralls-github-action. * Remove .travis.yml * Add relative_files = True in .coveragerc * GA: Ignore Python 3.7 on Windows * Remove unused coveralls lib * Remove pytest * Add comment for running performance test Co-authored-by: Harvey Thompson <58153750+Harveyt47@users.noreply.github.com> Co-authored-by: Matt McKay <mamckay@gmail.com>
1 parent 08a15f5 commit 128ed39

File tree

4 files changed

+63
-61
lines changed

4 files changed

+63
-61
lines changed

.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
[run]
2+
# relative_files = True is necessary as per documentation of
3+
# https://github.com/AndreMiras/coveralls-python-action
4+
relative_files = True
25
source = quantecon
36
omit =
47
*/python?.?/*

.coveralls.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: continuous-integration
2+
3+
# We ignore Python 3.7 on windows-latest because 3 tests are failing:
4+
# - FAIL: test_quadrect_2d_H (quantecon.tests.test_quad.TestQuadrect)
5+
# AssertionError:
6+
# Not equal to tolerance rtol=1e-07, atol=0
7+
# - FAIL: test_quadrect_2d_H2 (quantecon.tests.test_quad.TestQuadrect)
8+
# AssertionError:
9+
# Not equal to tolerance rtol=1e-07, atol=0
10+
# - The last error can't be found from the log
11+
#
12+
# Run this occasionally to test performance:
13+
# nosetests -a "slow"
14+
15+
on:
16+
push:
17+
branches:
18+
- master
19+
pull_request:
20+
21+
jobs:
22+
tests:
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
matrix:
26+
os: [windows-latest, ubuntu-latest, macos-latest]
27+
python-version: [3.7, 3.8]
28+
exclude:
29+
- os: windows-latest
30+
python-version: 3.7
31+
steps:
32+
- uses: actions/checkout@v2
33+
- name: Set up Python ${{ matrix.python-version }}
34+
uses: actions/setup-python@v1
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
- name: Install dependencies
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install -U nose coverage numpy scipy pandas numba sympy ipython statsmodels flake8
41+
pip install tables
42+
python setup.py install
43+
- name: Run Tests
44+
run: |
45+
flake8 --select F401, F405,E231 quantecon
46+
nosetests --with-coverage -a "!slow" --cover-package=quantecon
47+
- name: Coveralls Parallel
48+
uses: AndreMiras/coveralls-python-action@develop
49+
if: runner.os == 'Linux'
50+
with:
51+
flag-name: run-${{ matrix.test_number }}
52+
parallel: true
53+
coveralls_finish:
54+
needs: tests
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Coveralls Finished
58+
uses: AndreMiras/coveralls-python-action@develop
59+
with:
60+
parallel-finished: true

.travis.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)