Skip to content

Merge pull request #117 from cell2fire/reorg #167

Merge pull request #117 from cell2fire/reorg

Merge pull request #117 from cell2fire/reorg #167

name: test_datagenerator
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
container:
image: dlwoodruff/c2fcondatest:latest
env:
PATH: /opt/conda/bin:/opt/conda/condabin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
steps:
- uses: actions/checkout@v2
- name: make C++
run: |
cd cell2fire/Cell2FireC
make
- name: setup the program
run: |
python setup.py develop
- 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: run tests
run: |
cd tests
pytest test_datagenentor.py --cov=../cell2fire --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./tests/coverage.xml
flags: unittests
###env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false