name: Build

on:
  push:
    branches: master
  pull_request:
    branches: '*'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v3
    - name: Install node
      uses: actions/setup-node@v3
      with:
       node-version: '10.x'
    - name: Install Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.7'
        architecture: 'x64'
    - name: Install dependencies
      run: python -m pip install jupyterlab
    - name: Build the extension
      run: |
        jlpm
        jlpm run eslint:check
        python -m pip install .

        jupyter labextension list 2>&1 | grep -ie "crystaltoolkit-extension.*OK"
        python -m jupyterlab.browser_check
