Commit a36828d7 authored by Nicholas Bollweg's avatar Nicholas Bollweg
Browse files

update github actions, add test to dodo

parent 347de660
......@@ -19,6 +19,9 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: '14.x'
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Cache node modules
uses: actions/cache@v2
id: cache-node-modules
......@@ -36,17 +39,26 @@ jobs:
${{ env.CACHE_EPOCH }}-yarn-packages-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ env.CACHE_EPOCH }}-yarn-packages-
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-pip-
- name: Setup
run: |
pip install -U pip setuptools
pip install -r requirements.txt
- name: Install
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: |
yarn --frozen-lockfile
doit setup
- name: Build
run: |
yarn build
doit build
- name: Lint
run: |
yarn lint
doit lint
- name: Test
run: |
yarn build:test
yarn test
doit test
......@@ -9,8 +9,8 @@ dependencies:
- nodejs >=14,<15
- python >=3.8,<3.9
# build
- doit
- flit
- doit >=0.33,<0.34
- flit >=3.1
- pip
- wheel
- yarn <2
......
......@@ -8,6 +8,7 @@ from pathlib import Path
def task_setup():
"""perform initial non-python setup"""
yield dict(
name="js",
file_dep=[P.YARN_LOCK, *P.PACKAGE_JSONS, P.ROOT_PACKAGE_JSON],
......@@ -17,6 +18,7 @@ def task_setup():
def task_lint():
"""format and ensure style of code, docs, etc."""
yield U.ok(
B.OK_PRETTIER,
name="prettier",
......@@ -40,6 +42,7 @@ def task_lint():
def task_build():
"""build code and intermediate packages"""
yield dict(
name="js:lib",
file_dep=[*L.ALL_TS, P.ROOT_PACKAGE_JSON, *P.PACKAGE_JSONS, B.YARN_INTEGRITY],
......@@ -97,6 +100,7 @@ def task_build():
def task_docs():
"""build documentation"""
yield dict(
name="sphinx",
file_dep=[*P.DOCS_MD, *P.DOCS_PY, B.APP_PACK],
......@@ -106,6 +110,7 @@ def task_docs():
def task_watch():
"""watch sources and rebuild on change"""
yield dict(
name="js",
uptodate=[lambda: False],
......@@ -120,6 +125,16 @@ def task_watch():
)
def task_test():
"""test jupyterlite"""
yield U.ok(
B.OK_JEST,
name="js",
file_dep=[B.YARN_INTEGRITY, B.META_BUILDINFO],
actions=[U.do("jlpm", "build:test"), U.do("jlpm", "test")],
)
class C:
NAME = "jupyterlite"
APPS = ["classic", "lab"]
......@@ -205,7 +220,7 @@ class B:
OK_PRETTIER = OK / "prettier"
OK_ESLINT = OK / "eslint"
OK_BLACK = OK / "black"
OK_PIP_E = OK / "pip-e"
OK_JEST = OK / "jest"
class U:
......
doit >=0.33,<0.34
flit >=3.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment