mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-09 03:50:45 +08:00
199 lines
5.2 KiB
YAML
199 lines
5.2 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: '*'
|
|
pull_request:
|
|
branches: '*'
|
|
|
|
permissions:
|
|
contents:
|
|
write
|
|
|
|
env:
|
|
PIP_DISABLE_PIP_VERSION_CHECK: 1
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash -l {0}
|
|
|
|
jobs:
|
|
integrity:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Build checksum file
|
|
run: |
|
|
sed -n 20,146p .github/workflows/build.yml > build
|
|
sed -n 20,146p .github/workflows/release.yml > release
|
|
diff build release
|
|
|
|
test:
|
|
needs: [integrity]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Install node
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '14.x'
|
|
- name: Install Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.9'
|
|
architecture: 'x64'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip wheel
|
|
python -m pip install jupyter_packaging
|
|
- name: Install the package
|
|
run: |
|
|
python -m pip install .
|
|
jupyter labextension list 2>&1 | grep -ie "@retrolab/lab-extension.*enabled.*ok" -
|
|
jupyter server extension list 2>&1 | grep -ie "retrolab.*enabled" -
|
|
python -m jupyterlab.browser_check
|
|
- name: Lint
|
|
run: |
|
|
jlpm
|
|
jlpm run eslint:check
|
|
jlpm run prettier:check
|
|
- name: Test
|
|
run: |
|
|
jlpm run build:test
|
|
jlpm run test
|
|
|
|
build:
|
|
needs: [integrity]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Install node
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '14.x'
|
|
- name: Install Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.9'
|
|
architecture: 'x64'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip wheel
|
|
python -m pip install setuptools jupyter_packaging "jupyterlab>=3,<4"
|
|
- name: Build pypi distributions
|
|
run: |
|
|
python setup.py sdist bdist_wheel
|
|
- name: Build npm distributions
|
|
run: |
|
|
mkdir pkgs
|
|
jlpm lerna exec -- npm pack
|
|
cp packages/*/*.tgz pkgs
|
|
- name: Build checksum file
|
|
run: |
|
|
cd dist
|
|
sha256sum * | tee SHA256SUMS
|
|
cd ../pkgs
|
|
sha256sum * | tee SHA256SUMS
|
|
- name: Upload distributions
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: dist ${{ github.run_number }}
|
|
path: ./dist
|
|
- name: Upload distributions
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: pkgs ${{ github.run_number }}
|
|
path: ./pkgs
|
|
|
|
install:
|
|
runs-on: ${{ matrix.os }}-latest
|
|
needs: [build]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu, macos, windows]
|
|
python: ['3.6', '3.9']
|
|
include:
|
|
- python: '3.6'
|
|
dist: 'retrolab*.tar.gz'
|
|
- python: '3.9'
|
|
dist: 'retrolab*.whl'
|
|
- os: windows
|
|
py_cmd: python
|
|
- os: macos
|
|
py_cmd: python3
|
|
- os: ubuntu
|
|
py_cmd: python
|
|
steps:
|
|
- name: Install Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python }}
|
|
architecture: 'x64'
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: dist ${{ github.run_number }}
|
|
path: ./dist
|
|
- name: Install the prerequisites
|
|
run: |
|
|
${{ matrix.py_cmd }} -m pip install pip wheel
|
|
- name: Install the package
|
|
run: |
|
|
cd dist
|
|
${{ matrix.py_cmd }} -m pip install -vv ${{ matrix.dist }}
|
|
- name: Validate environment
|
|
run: |
|
|
${{ matrix.py_cmd }} -m pip freeze
|
|
${{ matrix.py_cmd }} -m pip check
|
|
- name: Validate the install
|
|
run: |
|
|
jupyter labextension list
|
|
jupyter labextension list 2>&1 | grep -ie "@retrolab/lab-extension.*enabled.*ok" -
|
|
jupyter server extension list
|
|
jupyter server extension list 2>&1 | grep -ie "retrolab.*enabled" -
|
|
jupyter retro --version
|
|
jupyter retro --help
|
|
|
|
end2end:
|
|
needs: [build]
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
browser: [firefox, chromium]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Install Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.9'
|
|
architecture: 'x64'
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: dist ${{ github.run_number }}
|
|
path: ./dist
|
|
- name: Install the prerequisites
|
|
run: |
|
|
python -m pip install pip wheel
|
|
- name: Install the package
|
|
run: |
|
|
cd dist
|
|
python -m pip install -vv retrolab*.whl
|
|
- uses: microsoft/playwright-github-action@v1
|
|
- name: Test
|
|
run: |
|
|
jlpm
|
|
jlpm run build:test
|
|
jlpm run test:ci
|
|
env:
|
|
BROWSER: ${{ matrix.browser }}
|
|
- uses: actions/upload-artifact@v2
|
|
if: ${{ always() }}
|
|
with:
|
|
name: test-artifacts-${{ matrix.browser }} ${{ github.run_number }}
|
|
path: app/artifacts
|