77 lines (66 loc) · 2.38 KB
/
tests.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
name: Tests
on:
push:
branches: [main]
pull_request:
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
run-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.7', '3.10']
include:
- os: "windows-latest"
python-version: "3.8"
- os: "macos-latest"
python-version: "3.9"
- os: "ubuntu-latest"
python-version: "pypy-3.8"
fail-fast: false
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Run base setup actions
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install Linux dependencies
if: startsWith(runner.os, 'Linux')
run: |
sudo apt-get update
sudo apt-get install texlive-plain-generic inkscape texlive-xetex
# pandoc is not up to date in the ubuntu repos, so we install directly
wget https://github.com/jgm/pandoc/releases/download/2.17.1.1/pandoc-2.17.1.1-1-amd64.deb && sudo dpkg -i pandoc-2.17.1.1-1-amd64.deb
- name: Install package dependencies
shell: bash
run: |
pip install codecov --user
pip install -e ".[execute,serve,test]" --user
pip install check-manifest
python -m ipykernel.kernelspec --user
# many things installed in --users need this to be in $PATH
echo "/Users/runner/.local/bin" >> $GITHUB_PATH
- name: List installed packages
run: |
pip freeze
pip check
- name: Check Manifest
run: check-manifest --ignore "share/**"
- name: Run tests with coverage
if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(runner.os, 'Windows') }}
shell: bash
run: |
# See https://github.com/pyppeteer/pyppeteer/pull/321
pip install -U websockets --user
python -m pytest --cov nbconvert -vv
- name: Run tests on pypy and Windows
if: ${{ startsWith(matrix.python-version, 'pypy') || startsWith(runner.os, 'Windows') }}
shell: bash
run: |
# See https://github.com/pyppeteer/pyppeteer/pull/321
pip install -U websockets --user
python -m pytest -vv
- name: Code coverage
run: codecov