@@ -12,18 +12,22 @@ stages:
1212 - job : Build
1313 strategy :
1414 matrix :
15- mac_38 :
16- imageName : ' macOS-12 '
15+ linux_py38_jlab3 :
16+ imageName : ' ubuntu-22.04 '
1717 python.version : ' 3.8'
18- mac_37 :
19- imageName : ' macOS-12'
20- python.version : ' 3.7'
21- linux_py38 :
22- imageName : ' ubuntu-20.04'
18+ jupyterlab.version : ' 3.6.5'
19+ linux_py39_jlab3 :
20+ imageName : ' ubuntu-22.04'
21+ python.version : ' 3.9'
22+ jupyterlab.version : ' 3.6.5'
23+ linux_py38_jlab4 :
24+ imageName : ' ubuntu-22.04'
2325 python.version : ' 3.8'
24- linux_py37 :
25- imageName : ' ubuntu-20.04'
26- python.version : ' 3.7'
26+ jupyterlab.version : ' 4.0.3'
27+ linux_py39_jlab4 :
28+ imageName : ' ubuntu-22.04'
29+ python.version : ' 3.9'
30+ jupyterlab.version : ' 4.0.3'
2731 pool :
2832 vmImage : $(imageName)
2933
@@ -33,42 +37,22 @@ stages:
3337 versionSpec : ' $(python.version)'
3438 architecture : ' x64'
3539
36- - script : |
37- echo $(node -v)
38- npm install --global yarn
39- displayName: 'Install NodeJS and yarn'
40- condition: eq(variables['imageName'], 'macOS-12')
41-
42- - script : |
43- sudo apt-get install curl
44- curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
45- sudo apt-get install nodejs
46- displayName: 'Install NodeJS'
47- condition: eq(variables['imageName'], 'ubuntu-20.04')
48-
49- - script : |
50- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
51- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
52- sudo apt update && sudo apt install yarn
53- displayName: 'Install yarn'
54- condition: eq(variables['imageName'], 'ubuntu-20.04')
55-
56- - script : python -m pip install --upgrade ipywidgets traitlets pytest build jupyter-packaging==0.10.6 jupyterlab==3.3.2
40+ - script : python -m pip install --upgrade ipywidgets traitlets pytest build jupyter-packaging==0.10.6 jupyterlab==$(jupyterlab.version)
5741 # pip installs release candidates by default:
5842 # https://github.com/pypa/pip/issues/4969
5943 displayName : ' Install dependencies'
6044
6145 - script : python -m pip install --upgrade black
6246 displayName : ' Install black (linter)'
63- condition : eq(variables['python.version'], '3.7 ')
47+ condition : eq(variables['python.version'], '3.8 ')
6448 - script : black --check .
6549 displayName : ' Test Formating'
66- condition : eq(variables['python.version'], '3.7 ')
50+ condition : eq(variables['python.version'], '3.8 ')
6751
6852 - task : NodeTool@0
6953 inputs :
70- versionSpec : ' 14 .x'
71- - script : yarn
54+ versionSpec : ' 18 .x'
55+ - script : jlpm
7256 displayName : ' Install labextension dependencies'
7357 env :
7458 NPM_TOKEN : $(NPM_TOKEN)
@@ -108,23 +92,23 @@ stages:
10892 jobs :
10993 - job : Deploy_package
11094 pool :
111- vmImage : ' ubuntu-20 .04'
95+ vmImage : ' ubuntu-22 .04'
11296
11397 steps :
11498 - task : UsePythonVersion@0
11599 inputs :
116100 versionSpec : ' 3.8'
117101 architecture : ' x64'
118102
119- - script : ' pip install twine build setuptools setuptools_scm jupyter-packaging==0.10.6 jupyterlab==3.3.2 '
103+ - script : ' pip install twine build setuptools setuptools_scm jupyter-packaging==0.10.6 jupyterlab==3.6.5 '
120104 displayName : ' Install twine/build'
121105
122106 - task : NodeTool@0
123107 inputs :
124- versionSpec : ' 14 .x'
108+ versionSpec : ' 18 .x'
125109 - script : |
126110 echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
127- yarn
111+ jlpm
128112 displayName: 'Save npm token & install labextension dependencies'
129113 env:
130114 NPM_TOKEN: $(NPM_TOKEN)
@@ -154,18 +138,7 @@ stages:
154138 - script : python -m twine upload -r "pypi-upload" --config-file $(PYPIRC_PATH) dist/*.whl
155139 displayName : ' Release to Pypi'
156140
157- - script : |
158- latestGitTag=$(git describe --tags --abbrev=0)
159- latestGitTag="${latestGitTag:1}"
160- echo $latestGitTag
161- if [[ $latestGitTag == *"beta"* ]];
162- then
163- echo "Publishing beta version";
164- yarn publish --new-version $latestGitTag --no-git-tag-version --access public --tag beta
165- else
166- echo "Publishing new version";
167- yarn publish --new-version $(./node_modules/.bin/git-tag-version) --no-git-tag-version --access public
168- fi
141+ - script : ./scripts/publish.sh
169142 env :
170143 GITHUB_TOKEN : $(GITHUB_TOKEN)
171144 NPM_TOKEN : $(NPM_TOKEN)
0 commit comments