Skip to content

Commit a95a9ad

Browse files
jtpiofcollonval
authored andcommitted
Run build_all CI job on Windows and Mac
1 parent 3e541bc commit a95a9ad

File tree

1 file changed

+32
-12
lines changed

1 file changed

+32
-12
lines changed

.github/workflows/main.yml

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010

1111
build_extensions:
12-
runs-on: ubuntu-latest
12+
runs-on: ${{ matrix.os }}
1313
strategy:
1414
fail-fast: false
1515
matrix:
@@ -27,6 +27,7 @@ jobs:
2727
- settings
2828
- state
2929
- widget-tracker/widgets
30+
os: [ubuntu-latest, macos-latest, windows-latest]
3031
steps:
3132
- name: Checkout
3233
uses: actions/checkout@v2
@@ -38,10 +39,11 @@ jobs:
3839
diff basics/hello-world/.gitignore ${EXAMPLE_FOLDER}/.gitignore
3940
env:
4041
EXAMPLE_FOLDER: ${{ matrix.example }}
42+
shell: bash
4143
- name: Install node
4244
uses: actions/setup-node@v1
4345
with:
44-
node-version: '10.x'
46+
node-version: '12.x'
4547
- name: Install Python
4648
uses: actions/setup-python@v1
4749
with:
@@ -55,12 +57,14 @@ jobs:
5557
jlpm
5658
env:
5759
EXAMPLE_FOLDER: ${{ matrix.example }}
60+
shell: bash
5861
- name: Lint the files
5962
run: |
6063
cd ${EXAMPLE_FOLDER}
6164
jlpm run eslint:check
6265
env:
6366
EXAMPLE_FOLDER: ${{ matrix.example }}
67+
shell: bash
6468
- name: Build and check by extension
6569
run: |
6670
cd ${EXAMPLE_FOLDER}
@@ -69,21 +73,27 @@ jobs:
6973
python -m jupyterlab.browser_check
7074
env:
7175
EXAMPLE_FOLDER: ${{ matrix.example }}
76+
shell: bash
7277

7378
build_serverextension:
74-
runs-on: ubuntu-latest
79+
runs-on: ${{ matrix.os }}
80+
strategy:
81+
fail-fast: false
82+
matrix:
83+
os: [ubuntu-latest, macos-latest, windows-latest]
7584
steps:
7685
- name: Checkout
7786
uses: actions/checkout@v2
7887
- name: Install node
7988
uses: actions/setup-node@v1
8089
with:
81-
node-version: '10.x'
90+
node-version: '12.x'
8291
- name: Check config files
8392
run: |
8493
diff basics/hello-world/tsconfig.json advanced/server-extension/tsconfig.json
8594
diff basics/hello-world/.eslintignore advanced/server-extension/.eslintignore
8695
diff basics/hello-world/.eslintrc.js advanced/server-extension/.eslintrc.js
96+
shell: bash
8797
- name: Install Python
8898
uses: actions/setup-python@v1
8999
with:
@@ -101,45 +111,55 @@ jobs:
101111
run: |
102112
cd advanced/server-extension
103113
jlpm run eslint:check
104-
- name: Build and check extension as user
114+
- name: Build extension as user
115+
# Force the usage of the source distribution (good practice)
105116
run: |
106117
cd advanced/server-extension
107-
# Force the usage of the source distribution (good practice)
108118
python setup.py sdist
109119
pip install jlab_ext_example --pre --find-links=dist --no-cache-dir
110120
jupyter lab build
111-
jupyter serverextension list list 1>serverextensions 2>&1
121+
python -m jupyterlab.browser_check
122+
- name: Check extension as dev
123+
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
124+
run: |
125+
jupyter serverextension list 1>serverextensions 2>&1
112126
cat serverextensions | grep "jlab_ext_example.*OK"
113127
jupyter labextension list 1>labextensions 2>&1
114128
cat labextensions | grep "@jupyterlab-examples/server-extension.*OK"
115-
python -m jupyterlab.browser_check
116129
- name: Clean extension installation
117130
run: |
118131
pip uninstall -y jlab_ext_example
119132
jupyter lab clean
120133
jupyter serverextension list
121134
jupyter labextension list
122-
- name: Build and check extension as dev
135+
- name: Build extension as dev
123136
run: |
124137
cd advanced/server-extension
125138
pip install -e .
126139
jupyter serverextension enable --py jlab_ext_example
127140
jupyter labextension link .
128-
jupyter serverextension list list 1>serverextensions 2>&1
141+
- name: Check extension as dev
142+
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
143+
run: |
144+
jupyter serverextension list 1>serverextensions 2>&1
129145
cat serverextensions | grep "jlab_ext_example.*OK"
130146
jupyter labextension list 1>labextensions 2>&1
131147
cat labextensions | grep "@jupyterlab-examples/server-extension.*OK"
132148
python -m jupyterlab.browser_check
133149
134150
build_all:
135-
runs-on: ubuntu-latest
151+
runs-on: ${{ matrix.os }}
152+
strategy:
153+
fail-fast: false
154+
matrix:
155+
os: [ubuntu-latest, macos-latest, windows-latest]
136156
steps:
137157
- name: Checkout
138158
uses: actions/checkout@v2
139159
- name: Install node
140160
uses: actions/setup-node@v1
141161
with:
142-
node-version: '10.x'
162+
node-version: '12.x'
143163
- name: Install Python
144164
uses: actions/setup-python@v1
145165
with:

0 commit comments

Comments
 (0)