diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..9f05566b --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,43 @@ +name: Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Add conda to $PATH + run: echo ::add-path::$CONDA/condabin + + - name: Update conda + run: conda update -y -n base conda setuptools + + - name: Init conda + run: | + conda init bash + conda info -a + - name: Create the conda environment + run: conda create -n jupyterlab-debugger --yes --quiet -c conda-forge nodejs jupyterlab=2 xeus-python=0.6.12 ptvsd python=$PYTHON_VERSION + env: + PYTHON_VERSION: '3.8' + + - name: Build the extension + run: | + source "$CONDA/etc/profile.d/conda.sh" + conda activate jupyterlab-debugger + jlpm + jlpm run build + + - name: Run the tests + run: | + source "$CONDA/etc/profile.d/conda.sh" + conda activate jupyterlab-debugger + export XEUS_LOG=1 + jlpm run test diff --git a/README.md b/README.md index d104bcd9..a463f192 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # @jupyterlab/debugger -[![Build Status](https://dev.azure.com/jupyterlab/jupyterlab/_apis/build/status/jupyterlab.debugger?branchName=master)](https://dev.azure.com/jupyterlab/jupyterlab/_build/latest?definitionId=3&branchName=master) +![Github Actions Status](https://github.com/jupyterlab/debugger/workflows/tests/badge.svg) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyterlab/debugger/stable?urlpath=/lab/tree/examples/index.ipynb) [![npm](https://img.shields.io/npm/v/@jupyterlab/debugger.svg)](https://www.npmjs.com/package/@jupyterlab/debugger) diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 475f896e..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,41 +0,0 @@ -pool: - vmImage: 'ubuntu-16.04' - -strategy: - matrix: - Tests: - python.version: '3.7' - testResultsFiles: 'tests/**/junit.xml' - -steps: -- bash: echo "##vso[task.prependpath]$CONDA/bin" - displayName: Add conda to PATH - -- bash: conda create --yes --quiet --name jupyterlab-debugger - displayName: Create a new conda environment - -- bash: | - source activate jupyterlab-debugger - conda install --yes --quiet -c conda-forge nodejs jupyterlab=2 xeus-python=0.6.12 ptvsd python=$PYTHON_VERSION - displayName: Install dependencies - -- bash: | - source activate jupyterlab-debugger - jlpm - jlpm run build - displayName: Build jupyterlab-debugger - -- bash: | - source activate jupyterlab-debugger - export XEUS_LOG=1 - jlpm run test - displayName: Run the tests - -- task: PublishTestResults@2 - displayName: 'Publish test results' - condition: variables['testResultsFiles'] - inputs: - testResultsFiles: '$(testResultsFiles)' - testRunTitle: '$(group)' - mergeTestResults: true -