|
| 1 | +parameters: |
| 2 | + platforms: |
| 3 | + - name: Linux |
| 4 | + vmImage: ubuntu-16.04 |
| 5 | + activate: source activate |
| 6 | + - name: MacOSX |
| 7 | + vmImage: macos-10.13 |
| 8 | + activate: source activate |
| 9 | + - name: Windows |
| 10 | + vmImage: vs2017-win2016 |
| 11 | + activate: call activate |
| 12 | + pythons: |
| 13 | + - name: ThreeSix |
| 14 | + spec: '>=3.6,<3.7.0a0' |
| 15 | + - name: ThreeSeven |
| 16 | + spec: '>=3.7,<3.8.0a0' |
| 17 | + |
| 18 | +jobs: |
| 19 | + - ${{ each platform in parameters.platforms }}: |
| 20 | + - ${{ each python in parameters.pythons}}: |
| 21 | + - job: ${{ platform.name }}${{ python.name }} |
| 22 | + pool: |
| 23 | + vmImage: ${{ platform.vmImage }} |
| 24 | + steps: |
| 25 | + - ${{ if eq(platform.name, 'Linux') }}: |
| 26 | + - bash: echo "##vso[task.prependpath]$CONDA/bin" |
| 27 | + displayName: conda $PATH |
| 28 | + |
| 29 | + - ${{ if eq(platform.name, 'MacOSX') }}: |
| 30 | + - bash: echo "##vso[task.prependpath]$CONDA/bin" |
| 31 | + displayName: conda $PATH |
| 32 | + |
| 33 | + - bash: sudo chown -R $USER $CONDA |
| 34 | + displayName: own conda |
| 35 | + |
| 36 | + - ${{ if eq(platform.name, 'Windows') }}: |
| 37 | + - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" |
| 38 | + displayName: conda %PATH% |
| 39 | + |
| 40 | + - script: conda install -yn base -c conda-forge conda python-libarchive-c |
| 41 | + displayName: update conda |
| 42 | + |
| 43 | + - script: ${{ platform.activate }} && cd ci && python env_template.py "${{ python.spec }}" |
| 44 | + displayName: update environment with python version |
| 45 | + |
| 46 | + - script: conda env update -n jupyterlab-lsp --file env-test.yml --quiet |
| 47 | + displayName: update conda environment with test dependencies |
| 48 | + |
| 49 | + - script: conda info && conda list -n jupyterlab-lsp |
| 50 | + displayName: list conda packages and info |
| 51 | + |
| 52 | + - task: CacheBeta@0 |
| 53 | + inputs: |
| 54 | + key: yarn | $(Agent.OS) | yarn.lock |
| 55 | + path: $(YARN_CACHE_FOLDER) |
| 56 | + displayName: restore cached yarn packages |
| 57 | + |
| 58 | + - script: ${{ platform.activate }} jupyterlab-lsp && jlpm |
| 59 | + displayName: install npm dependencies |
| 60 | + |
| 61 | + - script: ${{ platform.activate }} jupyterlab-lsp && jlpm build |
| 62 | + displayName: build typescript |
| 63 | + |
| 64 | + - script: ${{ platform.activate }} jupyterlab-lsp && python setup.py sdist bdist_wheel |
| 65 | + displayName: build python distributions |
| 66 | + |
| 67 | + - script: ${{ platform.activate }} jupyterlab-lsp && cd dist && npm pack .. |
| 68 | + displayName: build npm bundle |
| 69 | + |
| 70 | + - script: ${{ platform.activate }} jupyterlab-lsp && cd dist && python -m pip install jupyter_lsp-$(JLSP_VERSION)-py3-none-any.whl --no-deps |
| 71 | + displayName: install python wheel |
| 72 | + |
| 73 | + - script: ${{ platform.activate }} jupyterlab-lsp && jlpm tslint:check && jlpm test:jest |
| 74 | + displayName: run frontend unit tests |
| 75 | + |
| 76 | + - script: ${{ platform.activate }} jupyterlab-lsp && jupyter serverextension list |
| 77 | + displayName: list server extensions |
| 78 | + |
| 79 | + - script: ${{ platform.activate }} jupyterlab-lsp && python -m pytest --pyargs jupyter_lsp --cov jupyter_lsp --cov-report term-missing:skip-covered -p no:warnings --flake8 --cov-fail-under=100 -vv |
| 80 | + displayName: run python tests |
| 81 | + |
| 82 | + - script: ${{ platform.activate }} jupyterlab-lsp && cd dist && jupyter labextension install krassowski-jupyterlab-lsp-$(JLSP_VERSION).tgz @krassowski/jupyterlab_go_to_definition |
| 83 | + displayName: build lab |
| 84 | + |
| 85 | + - script: ${{ platform.activate }} jupyterlab-lsp && jupyter labextension list |
| 86 | + displayName: list labextensions |
0 commit comments