diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d8f819d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,79 @@ +name: pytest +on: + push: + branches: + - master + pull_request: + branches: + - '*' + +jobs: + test_suite: + name: Pytest on ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] + python-version: [2.7, 3.5, 3.6, 3.7] # 3.6 and 3.7 works + # exclude: + # - os: windows-latest + # python-version: 2.7 + # - os: macos-latest + # python-version: 3.7 + timeout-minutes: 60 + defaults: + run: + shell: bash -l {0} + env: + HV_REQUIREMENTS: "examples" + PYTHON_VERSION: ${{ matrix.python-version }} + CHANS_DEV: "-c pyviz/label/dev" + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ENV_NAME: "colorcet" + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "100" + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - uses: conda-incubator/setup-miniconda@v2 + with: + miniconda-version: "latest" + - name: conda setup + run: | + conda config --set always_yes True + conda --version + conda install -c pyviz "pyctdev>=0.5" + doit ecosystem_setup + doit env_create --name=${{ env.ENV_NAME }} --python=${{ matrix.python-version }} + conda --version + - name: doit develop_install + run: | + eval "$(conda shell.bash hook)" + conda activate ${{ env.ENV_NAME }} + conda --version + doit develop_install ${{ env.CHANS_DEV}} -o ${{ env.HV_REQUIREMENTS }} + conda list + - name: doit env_capture + run: | + eval "$(conda shell.bash hook)" + conda activate ${{ env.ENV_NAME }} + doit env_capture + - name: conda list + run: | + eval "$(conda shell.bash hook)" + conda activate ${{ env.ENV_NAME }} + conda list + - name: doit test_all + run: | + eval "$(conda shell.bash hook)" + conda activate ${{ env.ENV_NAME }} + doit test_all + - name: doit test_unit_extra + run: | + eval "$(conda shell.bash hook)" + conda activate ${{ env.ENV_NAME }} + pip install pytest-mpl + doit test_unit_extra diff --git a/.travis.yml b/.travis.yml index c171c3d..8f2f0f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,105 +1,105 @@ -language: generic +# language: generic -env: - global: - - CHANS_DEV="-c pyviz/label/dev" - - CHANS_REL="-c pyviz" - - LABELS_DEV="--label dev" - - LABELS_REL="--label dev --label main" - - PYENV_VERSION=3.7.1 - - PKG_TEST_PYTHON="--test-python=py37 --test-python=py27" +# env: +# global: +# - CHANS_DEV="-c pyviz/label/dev" +# - CHANS_REL="-c pyviz" +# - LABELS_DEV="--label dev" +# - LABELS_REL="--label dev --label main" +# - PYENV_VERSION=3.7.1 +# - PKG_TEST_PYTHON="--test-python=py37 --test-python=py27" -stages: - - test - - name: conda_dev_package - if: tag =~ ^v(\d+|\.)+[a-z]\d+$ - - name: pip_dev_package - if: tag =~ ^v(\d+|\.)+[a-z]\d+$ - - name: conda_package - if: tag =~ ^v(\d+|\.)+[^a-z]\d+$ - - name: pip_package - if: tag =~ ^v(\d+|\.)+[^a-z]\d+$ - - name: website_dev - if: tag =~ ^v(\d+|\.)+[a-z]\d+$ OR tag = website_dev - - name: website_release - if: tag =~ ^v(\d+|\.)+[^a-z]\d+$ OR tag = website +# stages: +# - test +# - name: conda_dev_package +# if: tag =~ ^v(\d+|\.)+[a-z]\d+$ +# - name: pip_dev_package +# if: tag =~ ^v(\d+|\.)+[a-z]\d+$ +# - name: conda_package +# if: tag =~ ^v(\d+|\.)+[^a-z]\d+$ +# - name: pip_package +# if: tag =~ ^v(\d+|\.)+[^a-z]\d+$ +# - name: website_dev +# if: tag =~ ^v(\d+|\.)+[a-z]\d+$ OR tag = website_dev +# - name: website_release +# if: tag =~ ^v(\d+|\.)+[^a-z]\d+$ OR tag = website -jobs: - include: - - &default - stage: test - os: linux - install: - - pip install pyctdev && doit miniconda_install && pip uninstall -y doit pyctdev - - export PATH="$HOME/miniconda/bin:$PATH" && hash -r - - conda config --set always_yes True - - conda install -c pyviz pyctdev && doit ecosystem_setup - before_script: - - doit env_create --name=colorcet --python=$PYENV_VERSION - - source activate colorcet - - doit develop_install $CHANS_DEV -o examples - - doit env_capture - script: - - doit test_all +# jobs: +# include: +# - &default +# stage: test +# os: linux +# install: +# - pip install pyctdev && doit miniconda_install && pip uninstall -y doit pyctdev +# - export PATH="$HOME/miniconda/bin:$PATH" && hash -r +# - conda config --set always_yes True +# - conda install -c pyviz pyctdev && doit ecosystem_setup +# before_script: +# - doit env_create --name=colorcet --python=$PYENV_VERSION +# - source activate colorcet +# - doit develop_install $CHANS_DEV -o examples +# - doit env_capture +# script: +# - doit test_all - - &website - <<: *default - stage: website_release - script: - # TODO: set chans according to dev/rel - - doit develop_install $CHANS_DEV -o doc -o examples - - doit build_website +# - &website +# <<: *default +# stage: website_release +# script: +# # TODO: set chans according to dev/rel +# - doit develop_install $CHANS_DEV -o doc -o examples +# - doit build_website - deploy: - - provider: pages - skip_cleanup: true - github_token: $GITHUB_TOKEN - local_dir: ./builtdocs - fqdn: colorcet.holoviz.org - on: - tags: true - all_branches: true +# deploy: +# - provider: pages +# skip_cleanup: true +# github_token: $GITHUB_TOKEN +# local_dir: ./builtdocs +# fqdn: colorcet.holoviz.org +# on: +# tags: true +# all_branches: true - - <<: *website - stage: website_dev - deploy: - - provider: pages - skip_cleanup: true - github_token: $GITHUB_TOKEN - local_dir: ./builtdocs - repo: pyviz-dev/colorcet - on: - tags: true - all_branches: true +# - <<: *website +# stage: website_dev +# deploy: +# - provider: pages +# skip_cleanup: true +# github_token: $GITHUB_TOKEN +# local_dir: ./builtdocs +# repo: pyviz-dev/colorcet +# on: +# tags: true +# all_branches: true - ## dev packages +# ## dev packages - - &pip_pkg - env: PYPI=testpypi PYPIUSER=$TPPU PYPIPASS=$TPPP - stage: pip_dev_package - install: pip install pyctdev && doit ecosystem=pip ecosystem_setup - before_script: - - doit ecosystem=pip package_build $PKG_TEST_PYTHON --test-group=unit --sdist-install-build-deps - script: doit ecosystem=pip package_upload -u $PYPIUSER -p $PYPIPASS --pypi ${PYPI} +# - &pip_pkg +# env: PYPI=testpypi PYPIUSER=$TPPU PYPIPASS=$TPPP +# stage: pip_dev_package +# install: pip install pyctdev && doit ecosystem=pip ecosystem_setup +# before_script: +# - doit ecosystem=pip package_build $PKG_TEST_PYTHON --test-group=unit --sdist-install-build-deps +# script: doit ecosystem=pip package_upload -u $PYPIUSER -p $PYPIPASS --pypi ${PYPI} - - &conda_pkg - <<: *default - stage: conda_dev_package - env: LABELS=$LABELS_DEV CHANS=$CHANS_DEV - before_script: - - travis_wait 60 doit package_build $CHANS $PKG_TEST_PYTHON --test-group=unit - script: doit package_upload --token=$ANACONDA_TOKEN $LABELS +# - &conda_pkg +# <<: *default +# stage: conda_dev_package +# env: LABELS=$LABELS_DEV CHANS=$CHANS_DEV +# before_script: +# - travis_wait 60 doit package_build $CHANS $PKG_TEST_PYTHON --test-group=unit +# script: doit package_upload --token=$ANACONDA_TOKEN $LABELS - ## release packages +# ## release packages - - <<: *pip_pkg - env: PYPI=pypi PYPIUSER=$PPU PYPIPASS=$PPP - stage: pip_package +# - <<: *pip_pkg +# env: PYPI=pypi PYPIUSER=$PPU PYPIPASS=$PPP +# stage: pip_package - - <<: *conda_pkg - stage: conda_package - env: LABELS=$LABELS_REL CHANS=$CHANS_REL +# - <<: *conda_pkg +# stage: conda_package +# env: LABELS=$LABELS_REL CHANS=$CHANS_REL -notifications: - email: false +# notifications: +# email: false diff --git a/setup.py b/setup.py index 61d652c..d0ec1ed 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ def get_setup_version(reponame): 'sphinx_holoviz_theme', ], 'tests_extra': tests + [ - 'pytest-mpl' # only available on pip and conda-forge + 'pytest-mpl', # only available on pip and conda-forge ], # until pyproject.toml/equivalent is widely supported (setup_requires # doesn't work well with pip)