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

more ci work

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