Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Github Actions #70

Merged
merged 26 commits into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .appveyor.yml

This file was deleted.

104 changes: 104 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: packages

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'

jobs:
conda_build:
name: Build Conda Packages
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -l {0}
env:
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
PKG_TEST_PYTHON: "--test-python=py37"
PYTHON_VERSION: "3.7"
CHANS: "-c pyviz"
MPLBACKEND: "Agg"
CONDA_UPLOAD_TOKEN: ${{ secrets.CONDA_UPLOAD_TOKEN }}
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"
python-version: ${{ env.PYTHON_VERSION }}
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: conda setup
run: |
conda config --set always_yes True
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
- name: conda build
run: doit package_build $CHANS_DEV $PKG_TEST_PYTHON --test-group=unit
- name: conda dev upload
if: (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))
run: doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev
- name: conda main upload
if: (!(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev --label=main
pip_build:
name: Build PyPI Packages
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -l {0}
env:
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
PKG_TEST_PYTHON: "--test-python=py37"
PYTHON_VERSION: "3.7"
CHANS: "-c pyviz"
MPLBACKEND: "Agg"
PPU: ${{ secrets.PPU }}
PPP: ${{ secrets.PPP }}
PYPI: "https://upload.pypi.org/legacy/"
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"
python-version: ${{ env.PYTHON_VERSION }}
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- name: conda setup
run: |
conda config --set always_yes True
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
doit env_create $CHANS_DEV --python=$PYTHON_VERSION
- name: env setup
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit develop_install $CHANS_DEV -o unit_tests
pip uninstall -y holoviews
doit pip_on_conda
- name: pip build
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit ecosystem=pip package_build
- name: pip upload
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit ecosystem=pip package_upload -u $PPU -p $PPP -r $PYPI
88 changes: 88 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@

name: docs

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
workflow_dispatch:

jobs:
build_docs:
name: Documentation
runs-on: 'ubuntu-latest'
timeout-minutes: 120
defaults:
run:
shell: bash -l {0}
env:
DESC: "Documentation build"
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
MPLBACKEND: "Agg"
DISPLAY: ":99.0"
PYTHON_DOCS_VERSION: "3.7"
steps:
- name: remove nodejs
run: |
sudo rm /usr/local/bin/node
sudo rm /usr/local/bin/npm
- uses: actions/checkout@v2
with:
fetch-depth: "100"
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: conda setup
run: |
conda config --set always_yes True
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
doit env_create ${{ env.CHANS_DEV}} --python=${{ env.PYTHON_DOCS_VERSION}}
- uses: actions/setup-node@v2
with:
node-version: '15'
- name: doit develop_install
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
conda install ${{ env.CHANS_DEV }} "pip<21.2.1"
conda list
doit develop_install ${{ env.CHANS_DEV}} -o doc -o examples
# Temporarily pin these two
conda install ${{ env.CHANS_DEV}} 'nbconvert==5.6.1' 'jupyter_client==6.1.12'
- name: doit env_capture
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit env_capture
- name: build docs
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit build_website
- name: git status
run: |
git status
git diff
- name: Deploy dev
uses: peaceiris/actions-gh-pages@v3
if: (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))
with:
personal_token: ${{ secrets.ACCESS_TOKEN }}
external_repository: pyviz-dev/colorcet
publish_dir: ./builtdocs
force_orphan: true
- name: Deploy main
if: (!(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./builtdocs
cname: colorcet.holoviz.org
force_orphan: true
146 changes: 146 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
name: tests

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: [3.6, 3.7, 3.8]
timeout-minutes: 60
defaults:
run:
shell: bash -l {0}
env:
HV_REQUIREMENTS: "examples"
PYTHON_VERSION: ${{ matrix.python-version }}
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENV_NAME: "colorcet"
MPLBACKEND: "Agg"
DISPLAY: ":99.0"
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 }}
- name: doit develop_install
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
doit develop_install ${{ env.CHANS_DEV}} -o ${{ env.HV_REQUIREMENTS }}
# Version of panel failing on Python 3.6
conda install ${{ env.CHANS_DEV}} "panel==0.12.1"
- name: doit env_capture
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
doit env_capture
- name: doit test_lint
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
doit test_lint
- name: doit test_unit
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
doit test_unit
- name: doit test_examples
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
doit test_examples
- name: doit test_unit_extra
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
pip install pytest-mpl
doit test_unit_extra

test_suite_py27:
name: Pytest on Python 2.7 only
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest']
python-version: [2.7]
timeout-minutes: 60
defaults:
run:
shell: bash -l {0}
env:
HV_REQUIREMENTS: "tests"
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENV_NAME: "colorcet"
MPLBACKEND: "Agg"
DISPLAY: ":99.0"
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"
python-version: ${{ matrix.python-version }}
- 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 }}
- name: doit develop_install
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
doit develop_install ${{ env.CHANS_DEV}} -o ${{ env.HV_REQUIREMENTS }}
- name: doit env_capture
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
doit env_capture
- name: Handling backports on 'ubuntu-latest'
if: matrix.os == 'ubuntu-latest'
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
conda install ${{ env.CHANS_DEV}} backports.functools_lru_cache
- name: doit env_capture again
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
doit env_capture
- name: doit test_unit
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
doit test_unit

Loading