Merge pull request #119 from cell2fire/typo #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: randweather | |
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/Harvest40x40/ --output-folder ../Harvest40x40 --ignitions --sim-years 2 --nsims 5 --grids --finalGrid --weather random --nweathers 200 --Fire-Period-Length 1.0 --output-messages --ROS-CV 0.8 --seed 123 --stats --allPlots --IgnitionRad 1 --combine --HarvestedCells ../data/Harvest40x40/band1_2.csv | |
- name: run tests | |
run: | | |
cd tests | |
pytest test_randweather.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 | |