Merge pull request #125 from DLWoodruff/readthedocs #80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test_h1 # Kotaro Yama | |
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: create input data | |
run: | | |
cd cell2fire | |
python main.py --input-instance-folder ../data/Sub20x20/ --output-folder ../results/Sub20x20/Sub20_RW_RI_N10 --sim-years 2 --nsims 10 --finalGrid --weather random --nweathers 100 --Fire-Period-Length 1.0 --ROS-CV 0.0 --seed 123 --IgnitionRad 0 --stats --output-messages --ROS-Threshold 0 --HFI-Threshold 0 --heuristic 1 | |
- name: run tests | |
run: | | |
cd tests | |
pytest test_h1.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 | |