|
| 1 | +name: tests |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + pull_request: |
| 7 | + branches: |
| 8 | + - '*' |
| 9 | + |
| 10 | +jobs: |
| 11 | + test_suite: |
| 12 | + name: Pytest on ${{ matrix.os }} with Python ${{ matrix.python-version }} |
| 13 | + runs-on: ${{ matrix.os }} |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + os: ['ubuntu-latest', 'windows-latest'] |
| 18 | + python-version: [2.7, 3.6, 3.7] |
| 19 | + exclude: |
| 20 | + - os: windows-latest |
| 21 | + python-version: 2.7 |
| 22 | + timeout-minutes: 30 |
| 23 | + defaults: |
| 24 | + run: |
| 25 | + shell: bash -l {0} |
| 26 | + env: |
| 27 | + DESC: "Python ${{ matrix.python-version }} tests" |
| 28 | + HV_REQUIREMENTS: "unit_tests" |
| 29 | + PYTHON_VERSION: ${{ matrix.python-version }} |
| 30 | + CHANS_DEV: "-c pyviz/label/dev" |
| 31 | + CHANS: "-c pyviz" |
| 32 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@v2 |
| 35 | + with: |
| 36 | + fetch-depth: "100" |
| 37 | + - uses: actions/setup-python@v2 |
| 38 | + with: |
| 39 | + auto-update-conda: true |
| 40 | + python-version: ${{ matrix.python-version }} |
| 41 | + - uses: conda-incubator/setup-miniconda@v2 |
| 42 | + with: |
| 43 | + miniconda-version: "latest" |
| 44 | + - name: Fetch unshallow |
| 45 | + run: git fetch --prune --tags --unshallow |
| 46 | + - name: conda setup |
| 47 | + run: | |
| 48 | + conda config --set always_yes True |
| 49 | + conda install -c pyviz "pyctdev>=0.5" |
| 50 | + doit ecosystem_setup |
| 51 | + conda install nodejs |
| 52 | + doit env_create ${{ env.CHANS_DEV}} --python=${{ matrix.python-version }} |
| 53 | + - name: doit develop_install py2 |
| 54 | + if: startsWith(matrix.python-version, 2.) |
| 55 | + run: | |
| 56 | + eval "$(conda shell.bash hook)" |
| 57 | + conda activate test-environment |
| 58 | + conda list |
| 59 | + doit develop_install -c pyviz/label/dev -o tests |
| 60 | + - name: doit develop_install py3 |
| 61 | + if: startsWith(matrix.python-version, 3.) |
| 62 | + run: | |
| 63 | + eval "$(conda shell.bash hook)" |
| 64 | + conda activate test-environment |
| 65 | + conda list |
| 66 | + doit develop_install ${{ env.CHANS_DEV}} -o examples -o tests |
| 67 | + - name: pygraphviz |
| 68 | + if: contains(matrix.os, 'ubuntu') |
| 69 | + run: | |
| 70 | + eval "$(conda shell.bash hook)" |
| 71 | + conda activate test-environment |
| 72 | + conda install -c conda-forge pygraphviz |
| 73 | + - name: doit env_capture |
| 74 | + run: | |
| 75 | + eval "$(conda shell.bash hook)" |
| 76 | + conda activate test-environment |
| 77 | + doit env_capture |
| 78 | + - name: doit test_flakes |
| 79 | + run: | |
| 80 | + eval "$(conda shell.bash hook)" |
| 81 | + conda activate test-environment |
| 82 | + doit test_flakes |
| 83 | + - name: doit test_unit |
| 84 | + run: | |
| 85 | + eval "$(conda shell.bash hook)" |
| 86 | + conda activate test-environment |
| 87 | + doit test_unit |
| 88 | + - name: test examples ubuntu |
| 89 | + if: contains(matrix.os, 'ubuntu') && startsWith(matrix.python-version, 3.) |
| 90 | + run: | |
| 91 | + eval "$(conda shell.bash hook)" |
| 92 | + conda activate test-environment |
| 93 | + bokeh sampledata |
| 94 | + doit test_examples_extra |
| 95 | + - name: test examples windows |
| 96 | + if: contains(matrix.os, 'windows') |
| 97 | + run: | |
| 98 | + eval "$(conda shell.bash hook)" |
| 99 | + conda activate test-environment |
| 100 | + bokeh sampledata |
| 101 | + doit test_examples |
| 102 | + - name: codecov |
| 103 | + env: |
| 104 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 105 | + if: startsWith(matrix.python-version, 3.) |
| 106 | + run: | |
| 107 | + eval "$(conda shell.bash hook)" |
| 108 | + conda activate test-environment |
| 109 | + coveralls |
0 commit comments