Skip to content

Commit 680ab74

Browse files
authored
CI: Add a CI job for testing using conda (#600)
* ENH: Add an environment file * CI: Setup a CI using conda * CI: Using setup build * CI: Use bash shell * CI: add requests module
1 parent 5be42da commit 680ab74

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

.github/workflows/conda_ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: conda-build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
12+
jobs:
13+
tests:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [windows-latest, ubuntu-latest, macos-latest]
18+
python-version: [3.7, 3.8, 3.9]
19+
exclude:
20+
- os: windows-latest
21+
python-version: 3.7
22+
steps:
23+
- uses: actions/checkout@v2
24+
with:
25+
fetch-depth: 0
26+
27+
- uses: conda-incubator/setup-miniconda@v2
28+
with:
29+
auto-update-conda: true
30+
environment-file: environment.yml
31+
python-version: ${{ matrix.python-version }}
32+
auto-activate-base: false
33+
34+
- name: Conda info
35+
shell: bash -l {0}
36+
run: |
37+
conda info
38+
conda list
39+
40+
- name: Setup QuantEcon
41+
run: |
42+
python setup.py build
43+
44+
- name: Run Tests
45+
shell: bash -l {0}
46+
run: |
47+
flake8 --select F401, F405, E231 quantecon
48+
nosetests --with-coverage -a "!slow" --cover-package=quantecon
49+
50+
- name: Coveralls Parallel (Linux)
51+
uses: AndreMiras/coveralls-python-action@develop
52+
if: runner.os == 'Linux'
53+
with:
54+
flag-name: run-${{ matrix.test_number }}
55+
parallel: true
56+
57+
coveralls_finish:
58+
needs: tests
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Coveralls Finished
62+
uses: AndreMiras/coveralls-python-action@develop
63+
with:
64+
parallel-finished: true

environment.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: qe
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- nose
7+
- coverage
8+
- numpy
9+
- scipy
10+
- pandas
11+
- numba
12+
- sympy
13+
- ipython
14+
- statsmodels
15+
- flake8
16+
- requests

0 commit comments

Comments
 (0)