language: python
python:
  - "3.6"
  - "3.8"


# command to install dependencies
install:
  - pip install --upgrade  -r requirements.txt
  - pip install coverage codecov
  - python setup.py install

# command to run tests
script:
  - coverage run -p sko/demo_func.py
  - coverage run -p examples/demo_ga.py
  - coverage run -p examples/demo_ga_tsp.py
  - coverage run -p examples/demo_ga_udf.py
  - coverage run -p examples/demo_ga_udf_tsp.py
  - coverage run -p examples/demo_pso.py
  - coverage run -p examples/demo_sa.py
  - coverage run -p examples/demo_sa_tsp.py examples/data/nctu.csv
  - coverage run -p examples/demo_aca_tsp.py
  - coverage run -p examples/demo_ia.py
  - coverage run -p examples/demo_afsa.py
  - coverage run -p examples/demo_pso_ani.py
  - coverage run -p examples/demo_de.py
  - coverage run -p examples/vrp.py
  - coverage run -p examples/example_function_modes.py
  - coverage run -p examples/example_method_modes.py
  - coverage run -p tests/test_x2gray.py
  - coverage run -p examples/demo_rcga.py

# Push the results back to codecov
after_success:
  - coverage combine
  - codecov
