Improve Notebook 7 functionality and testing #206
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
workflow_dispatch: | |
env: | |
PYTHONUNBUFFERED: '1' | |
PIP_DISABLE_PIP_VERSION_CHECK: '1' | |
CI: '1' | |
# our stuff | |
ROBOT_RETRIES: '3' | |
CACHE_EPOCH: '5' | |
DOIT_N_BUILD: '-n4' | |
PABOT_PROCESSES: '3' | |
jobs: | |
build: | |
name: build | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
matrix: | |
os: [ubuntu] | |
python-version: ['3.11'] | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
BUILDING_IN_CI: '1' | |
steps: | |
- uses: actions/checkout@v4 | |
# configure builtin providers | |
- name: setup (python) | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: setup (node) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
# restore caches | |
- name: cache (pip) | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: | | |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-pip-build-${{ hashFiles('.github/requirements-build.txt') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-pip-build- | |
- name: cache (node) | |
uses: actions/cache@v3 | |
id: cache-node-modules | |
with: | |
path: '**/node_modules' | |
key: | | |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-build-${{ hashFiles('yarn.lock') }} | |
- name: cache (yarn) | |
uses: actions/cache@v3 | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
id: cache-yarn-packages | |
with: | |
path: .yarn-packages | |
key: | | |
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}- | |
${{ env.CACHE_EPOCH }}-yarn- | |
- name: setup (pip) | |
run: pip install -U pip wheel setuptools | |
- name: setup (pip build) | |
run: pip install -U -v -r .github/requirements-build.txt | |
- name: check (pip) | |
run: | | |
set -eux | |
mkdir -p build/pip | |
pip freeze | tee build/pip/dist.pip.freeze | |
pip check | |
- name: list | |
run: doit list --all --status | |
- name: build | |
run: doit ${{ matrix.DOIT_N_BUILD }} dist || doit dist | |
- name: status | |
run: doit list --all --status | sort | |
if: always() | |
- name: Upload (dist) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: jupyterlab-deck-dist-${{ github.run_number }} | |
path: ./dist | |
lint: | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
matrix: | |
os: [ubuntu] | |
python-version: ['3.11'] | |
env: | |
WITH_JS_COV: 1 | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: cache (conda) | |
uses: actions/cache@v3 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | | |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-conda-lint-${{ matrix.python-version }}-${{ hashFiles('.binder/environment.yml') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-conda-lint-${{ matrix.python-version }}- | |
- name: Cache (node_modules) | |
uses: actions/cache@v3 | |
id: cache-node-modules | |
with: | |
path: node_modules/ | |
key: | | |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} | |
- name: install (conda) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
environment-file: .binder/environment.yml | |
miniforge-variant: Mambaforge | |
use-mamba: true | |
- name: lint | |
run: doit lint | |
- name: dist | |
env: | |
WITH_JS_COV: 0 | |
run: doit dist | |
- name: build | |
run: doit build | |
- name: dev | |
run: doit dev | |
- name: test latest (with cov) | |
run: doit test:robot | |
- name: dev (legacy) | |
run: doit legacy:pip | |
- name: test legacy | |
run: doit legacy:robot | |
- name: report | |
run: doit report | |
- name: docs | |
run: doit docs | |
- name: check | |
run: doit check | |
- name: upload (reports) | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: jupyterlab-deck-lint-reports-${{ github.run_number }} | |
path: ./build/reports | |
- uses: codecov/codecov-action@v3 | |
with: | |
directory: ./build/reports/nyc/ | |
verbose: true | |
flags: front-end | |
test: | |
needs: [build] | |
name: ${{ matrix.os }} ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['ubuntu', 'macos', 'windows'] | |
python-version: ['3.8', '3.11'] | |
include: | |
- python-version: '3.8' | |
CI_ARTIFACT: 'sdist' | |
- python-version: '3.11' | |
CI_ARTIFACT: 'wheel' | |
env: | |
TESTING_IN_CI: '1' | |
steps: | |
- name: configure line endings | |
run: | | |
git config --global core.autocrlf false | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: cache (conda) | |
uses: actions/cache@v3 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | | |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-conda-test-${{ matrix.python-version }}-${{ hashFiles('.github/environment-test.yml') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-conda-test-${{ matrix.python-version }}- | |
- name: install (conda) | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
python-version: ${{ matrix.python-version }} | |
environment-file: .github/environment-test.yml | |
use-mamba: true | |
- name: download (dist) | |
uses: actions/download-artifact@v3 | |
with: | |
name: jupyterlab-deck-dist-${{ github.run_number }} | |
path: ./dist | |
- name: dev (unix) | |
if: matrix.os != 'windows' | |
shell: bash -l {0} | |
run: doit dev | |
- name: dev (windows) | |
if: matrix.os == 'windows' | |
shell: cmd /C CALL {0} | |
run: doit dev | |
- name: test latest (unix) | |
if: matrix.os != 'windows' | |
shell: bash -l {0} | |
run: doit test | |
- name: test latest (windows) | |
if: matrix.os == 'windows' | |
shell: cmd /C CALL {0} | |
run: doit test | |
- name: upload (reports) | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: |- | |
jupyterlab-deck-reports-${{ matrix.os }}-${{matrix.python-version }}-${{ github.run_number }} | |
path: ./build/reports |