|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | build: |
11 | | - runs-on: ubuntu-latest |
| 11 | + runs-on: ${{ matrix.os }} |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 16 | + python-version: ["3.7", "3.10"] |
12 | 17 | steps: |
13 | 18 | - name: Checkout |
14 | 19 | uses: actions/checkout@v2 |
15 | | - - name: Install node |
16 | | - uses: actions/setup-node@v1 |
17 | | - with: |
18 | | - node-version: "12.x" |
19 | | - - name: Install Python |
20 | | - uses: actions/setup-python@v2 |
21 | | - with: |
22 | | - python-version: "3.7" |
23 | | - architecture: "x64" |
24 | 20 |
|
25 | | - - name: Setup pip cache |
26 | | - uses: actions/cache@v2 |
27 | | - with: |
28 | | - path: ~/.cache/pip |
29 | | - key: pip-3.7-${{ hashFiles('package.json') }} |
30 | | - restore-keys: | |
31 | | - pip-3.7- |
32 | | - pip- |
33 | | -
|
34 | | - - name: Get npm cache directory |
35 | | - id: npm-cache |
36 | | - run: | |
37 | | - echo "::set-output name=dir::$(npm config get cache)" |
38 | | - - uses: actions/cache@v2 |
39 | | - with: |
40 | | - path: ${{ steps.npm-cache.outputs.dir }} |
41 | | - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} |
42 | | - restore-keys: | |
43 | | - ${{ runner.os }}-node- |
| 21 | + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
44 | 22 |
|
45 | 23 | - name: Install dependencies |
46 | 24 | run: | |
47 | | - python -m pip install -U pip setuptools codecov |
| 25 | + python -m pip install -U codecov |
48 | 26 | npm install -g codecov |
49 | 27 | - name: Test the extension |
50 | 28 | run: | |
51 | 29 | python -m pip install --upgrade -v -e ".[test, examples, docs]" |
52 | | - yarn run lint:check |
53 | | -
|
54 | | - pytest |
| 30 | + python -m pytest |
55 | 31 | yarn run test |
56 | 32 |
|
| 33 | + - name: Linting |
| 34 | + if: ${{ matrix.os == 'ubuntu-latest' }} |
| 35 | + run: | |
| 36 | + yarn run lint:check |
| 37 | +
|
57 | 38 | - name: Check docs can be build + links |
| 39 | + if: ${{ matrix.os == 'ubuntu-latest' }} |
| 40 | + working-directory: docs |
58 | 41 | run: | |
59 | 42 | sudo apt install -y pandoc |
60 | | - pushd docs |
61 | 43 | make html |
62 | 44 | python -m pytest --check-links |
63 | | - popd |
0 commit comments