Commit 521e32ad authored by Nicholas Bollweg's avatar Nicholas Bollweg
Browse files

more ci work

parent c57b69d5
...@@ -51,8 +51,9 @@ jobs: ...@@ -51,8 +51,9 @@ jobs:
pip install -U pip setuptools pip install -U pip setuptools
pip install -r requirements.txt pip install -r requirements.txt
- name: Install - name: Install
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: | run: |
doit setup doit setup:js
- name: Build - name: Build
run: | run: |
doit build doit build
......
...@@ -9,35 +9,41 @@ from pathlib import Path ...@@ -9,35 +9,41 @@ from pathlib import Path
def task_setup(): def task_setup():
"""perform initial non-python setup""" """perform initial non-python setup"""
args = ["yarn", "--prefer-offline", "--ignore-optional"]
if C.CI:
args += ["--frozen-lockfile"]
yield dict( yield dict(
name="js", name="js",
file_dep=[P.YARN_LOCK, *P.PACKAGE_JSONS, P.ROOT_PACKAGE_JSON], file_dep=[P.YARN_LOCK, *P.PACKAGE_JSONS, P.ROOT_PACKAGE_JSON],
actions=[U.do("yarn", "--prefer-offline", "--ignore-optional")], actions=[U.do(*args)],
targets=[B.YARN_INTEGRITY], targets=[B.YARN_INTEGRITY],
) )
def task_lint(): def task_lint():
"""format and ensure style of code, docs, etc.""" """format and ensure style of code, docs, etc."""
yield U.ok( yield U.ok(
B.OK_PRETTIER, B.OK_PRETTIER,
name="prettier", name="prettier",
file_dep=[*L.ALL_PRETTIER, B.YARN_INTEGRITY], file_dep=[*L.ALL_PRETTIER, B.YARN_INTEGRITY],
actions=[U.do("yarn", "prettier")], actions=[U.do("yarn", "prettier" if C.CI else "prettier:check")],
) )
yield U.ok( yield U.ok(
B.OK_ESLINT, B.OK_ESLINT,
name="eslint", name="eslint",
file_dep=[B.OK_PRETTIER], file_dep=[B.OK_PRETTIER],
actions=[U.do("yarn", "eslint")], actions=[U.do("yarn", "eslint" if C.CI else "eslint:check")],
) )
yield U.ok( yield U.ok(
B.OK_BLACK, B.OK_BLACK,
name="black", name="black",
file_dep=L.ALL_BLACK, file_dep=L.ALL_BLACK,
actions=[U.do("black", *L.ALL_BLACK)], actions=[U.do("black", *(["--check"] if C.CI else []), *L.ALL_BLACK)],
) )
...@@ -139,6 +145,7 @@ class C: ...@@ -139,6 +145,7 @@ class C:
NAME = "jupyterlite" NAME = "jupyterlite"
APPS = ["classic", "lab"] APPS = ["classic", "lab"]
ENC = dict(encoding="utf-8") ENC = dict(encoding="utf-8")
CI = bool(json.loads(os.environ.get("CI", "0")))
class P: class P:
......
black
doit >=0.33,<0.34 doit >=0.33,<0.34
flit >=3.1 flit >=3.1
Supports Markdown
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