tests #226
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: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
workflow_dispatch: | |
schedule: | |
- cron: '0 9 * * SUN' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
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'] | |
# Run on the full set on schedule, workflow_dispatch and push&tags events, otherwise on a subset. | |
python-version: ${{ ( github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || ( github.event_name == 'push' && github.ref_type == 'tag' ) ) && fromJSON('["3.7", "3.8", "3.9", "3.10", "3.11"]') || fromJSON('["3.7", "3.11"]') }} | |
timeout-minutes: 60 | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ENV_NAME: "colorcet" | |
MPLBACKEND: "Agg" | |
DISPLAY: ":99.0" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: "100" | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
- name: Fetch | |
run: git fetch --prune --tags -f | |
- name: conda setup | |
run: | | |
conda update -n base conda | |
conda create -n ${{ env.ENV_NAME }} | |
conda activate ${{ env.ENV_NAME }} | |
conda config --env --prepend channels pyviz/label/dev | |
conda config --env --show-sources | |
conda install python=${{ matrix.python-version }} pyctdev | |
- name: doit develop_install | |
run: | | |
conda activate ${{ env.ENV_NAME }} | |
doit develop_install -o tests -o examples | |
- name: pin bokeh on Python 3.8 | |
if: matrix.python-version == '3.8' | |
# Pin to avoid pulling an old version of Bokeh and Panel. | |
run: | | |
conda activate ${{ env.ENV_NAME }} | |
conda install "bokeh >=3" | |
- name: doit env_capture | |
run: | | |
conda activate ${{ env.ENV_NAME }} | |
doit env_capture | |
- name: doit test_lint | |
run: | | |
conda activate ${{ env.ENV_NAME }} | |
doit test_lint | |
- name: doit test_unit | |
run: | | |
conda activate ${{ env.ENV_NAME }} | |
doit test_unit | |
- name: doit test_examples | |
run: | | |
conda activate ${{ env.ENV_NAME }} | |
doit test_examples | |
- name: doit test_unit_extra | |
run: | | |
conda activate ${{ env.ENV_NAME }} | |
pip install pytest-mpl | |
doit test_unit_extra | |
- uses: codecov/codecov-action@v3 | |
if: github.event_name == 'push' |