Skip to content

Commit

Permalink
CI: Add a CI job for testing using conda (#600)
Browse files Browse the repository at this point in the history
* ENH: Add an environment file

* CI: Setup a CI using conda

* CI: Using setup build

* CI: Use bash shell

* CI: add requests module
  • Loading branch information
Smit-create committed Feb 14, 2022
1 parent 5be42da commit 680ab74
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/conda_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: conda-build

on:
push:
branches:
- master
pull_request:
branches:
- master


jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: [3.7, 3.8, 3.9]
exclude:
- os: windows-latest
python-version: 3.7
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false

- name: Conda info
shell: bash -l {0}
run: |
conda info
conda list
- name: Setup QuantEcon
run: |
python setup.py build
- name: Run Tests
shell: bash -l {0}
run: |
flake8 --select F401, F405, E231 quantecon
nosetests --with-coverage -a "!slow" --cover-package=quantecon
- name: Coveralls Parallel (Linux)
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
16 changes: 16 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: qe
channels:
- conda-forge
- defaults
dependencies:
- nose
- coverage
- numpy
- scipy
- pandas
- numba
- sympy
- ipython
- statsmodels
- flake8
- requests

0 comments on commit 680ab74

Please sign in to comment.