122 lines (121 loc) · 4.32 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
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: [3.6, 3.7, 3.8]
timeout-minutes: 60
defaults:
run:
shell: bash -l {0}
env:
DESC: "Python ${{ matrix.python-version }} tests"
HV_REQUIREMENTS: "unit_tests"
PYTHON_VERSION: ${{ matrix.python-version }}
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
MPLBACKEND: "Agg"
GITHUB_TOKEN: ${{ secrets.GITHUB_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"
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow
- 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=${{ matrix.python-version }}
- name: doit env_capture
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit env_capture
- name: doit develop_install
if: matrix.os != 'macos-latest'
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 ${{ env.HV_REQUIREMENTS }}
python -c "from param import version; print(version.Version.setup_version('.', 'holoviews', archive_commit='$Format:%h$'))"
echo "-----"
git describe
echo "======"
conda list
# Temporary step for Mac only due doit to develop_install failing
- name: doit develop_install on Mac
if: matrix.os == 'macos-latest'
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 ${{ env.HV_REQUIREMENTS }} || echo "Keep going"
pip install --no-deps --no-build-isolation -e .
python -c "from param import version; print(version.Version.setup_version('.', 'holoviews', archive_commit='$Format:%h$'))"
echo "-----"
git describe
echo "======"
conda list
# Pin panel on Python 3.6 because one or more dev releases on the 0.13.* series
# can be installed on Python 3.6 but are actually not compatible with Python 3.6
# Panel 0.13 will support Python >= 3.7 only so the pin here can stay indefinitely.
- name: Pin panel on py36
if: matrix.python-version == '3.6'
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
conda install -c pyviz "panel=0.12"
- name: Patch - do not install cffi 1.15.0 on macos and for python != 3.6
if: matrix.os == 'macos-latest' && matrix.python-version != '3.6'
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
conda install ${{ env.CHANS_DEV}} "cffi!=1.15.0"
- name: doit env_capture
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit env_capture
- name: doit test_flakes
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit test_flakes
- name: doit test_unit
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit test_unit
- name: test examples
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit test_examples
- name: run coveralls
env:
github-token: ${{ secrets.GITHUB_TOKEN }}
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
coveralls --service=github