# vim ft=yaml
# Multiple lines can be made a single "virtual line" because of how Travis
# munges each line before executing it to print out the exit status.  It's okay
# for it to be on multiple physical lines, so long as you remember: - There
# can't be any leading "-"s - All newlines will be removed, so use ";"s

os: linux
arch: arm64
dist: focal
language: python
cache: pip

env:
    global:
        # Note that DEPENDS, OPTIONAL_DEPENDS and EXTRA_PIP_FLAGS are
        # indirect and (when non-empty) refer to variables in tools/ci/env.sh
        - DEPENDS="REQUIREMENTS"
        - OPTIONAL_DEPENDS="DEFAULT_OPT_DEPENDS"
        - EXTRA_PIP_FLAGS=""
        - INSTALL_TYPE="pip"
        - CHECK_TYPE="test"

python:
    - 3.7
    - 3.8
    - 3.9
    - "3.10"

# Set up virtual environment, build package, build from depends
before_install:
    - travis_retry tools/ci/create_venv.sh
    - source tools/ci/build_archive.sh
    - travis_retry tools/ci/install_dependencies.sh

# command to install dependencies
install:
    - tools/ci/install.sh

# command to run tests, e.g. python setup.py test
script:
    - tools/ci/check.sh

after_script:
    - travis_retry python3 -m pip install codecov
    - codecov

notifications:
    webhooks: http://nipy.bic.berkeley.edu:54856/travis
