initial build/test steps for nodejs
This commit is contained in:
parent
f20c2b24f0
commit
6ac1015718
@ -10,6 +10,11 @@ executors:
|
||||
- image: cimg/python:3.11
|
||||
resource_class: small
|
||||
|
||||
nodejs:
|
||||
docker:
|
||||
- image: node:18
|
||||
resource_class: small
|
||||
|
||||
|
||||
jobs:
|
||||
python-test:
|
||||
@ -29,13 +34,76 @@ jobs:
|
||||
- python/dist
|
||||
- run: pip install twine && twine upload dist/*
|
||||
|
||||
nodesjs-test:
|
||||
executor: nodejs
|
||||
working_directory: ./zx/lib
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- restore_cache:
|
||||
name: restore pnpm cache
|
||||
keys:
|
||||
- pnpm-packages-{{ checksum "pnpm-lock.yaml" }}
|
||||
|
||||
- run:
|
||||
name: pnpm install
|
||||
command: |
|
||||
corepack enable
|
||||
corepack prepare pnpm@latest-8 --activate
|
||||
pnpm config set store-dir .pnpm-store
|
||||
pnpm install
|
||||
|
||||
- save_cache:
|
||||
name: save pnpm cache
|
||||
key: pnpm-packages-{{ checksum "pnpm-lock.yaml" }}
|
||||
paths:
|
||||
- .pnpm-store
|
||||
|
||||
- run: pnpm test
|
||||
- run: pnpm lint
|
||||
|
||||
nodesjs-publish:
|
||||
executor: nodejs
|
||||
working_directory: ./zx/lib
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- restore_cache:
|
||||
name: restore pnpm cache
|
||||
keys:
|
||||
- pnpm-packages-{{ checksum "pnpm-lock.yaml" }}
|
||||
|
||||
- run:
|
||||
name: pnpm install
|
||||
command: |
|
||||
corepack enable
|
||||
corepack prepare pnpm@latest-8 --activate
|
||||
pnpm config set store-dir .pnpm-store
|
||||
pnpm install
|
||||
|
||||
- save_cache:
|
||||
name: save pnpm cache
|
||||
key: pnpm-packages-{{ checksum "pnpm-lock.yaml" }}
|
||||
paths:
|
||||
- .pnpm-store
|
||||
|
||||
- run: pnpm build
|
||||
- run: pnpm version $(git describe --tags)
|
||||
|
||||
|
||||
workflows:
|
||||
build:
|
||||
jobs:
|
||||
- python-test
|
||||
- publish:
|
||||
requires: [test]
|
||||
- python-publish:
|
||||
requires: [python-test]
|
||||
filters:
|
||||
branches:
|
||||
only: main
|
||||
|
||||
- nodejs-test
|
||||
- nodejs-publish:
|
||||
requires: [nodejs-test]
|
||||
filters:
|
||||
branches:
|
||||
only: main
|
||||
|
@ -9,7 +9,7 @@
|
||||
"scripts": {
|
||||
"build": "rm -rf ./dist && tsc",
|
||||
"test": "jest",
|
||||
"lint": "eslint .",
|
||||
"lint": "eslint . && prettier --check src/",
|
||||
"format": "prettier --write src/"
|
||||
},
|
||||
"author": "Wryn (yage) Wagner",
|
||||
@ -95,6 +95,5 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"execa": "^8.0.1"
|
||||
},
|
||||
"version": "3.9.1"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user