
- Replace npm install with yarn install at root level - Add descriptive comments in Chinese for build steps - Streamline dependency installation process in gui directory The commit message reflects the changes to the CircleCI configuration file, where the main changes involve standardizing the use of yarn for package management and adding clarity through comments. Since no specific issue number was provided in the input, I've excluded the "Closes #" reference.
92 lines
2.4 KiB
YAML
92 lines
2.4 KiB
YAML
version: 2.1
|
|
executors:
|
|
node-executor:
|
|
docker:
|
|
- image: cimg/node:20.2.0
|
|
jobs:
|
|
build:
|
|
executor: node-executor
|
|
steps:
|
|
- checkout
|
|
- run: git submodule sync
|
|
- run: git submodule update --init --recursive
|
|
# 首先在根目录安装依赖
|
|
- run: yarn install
|
|
# 然后进入 gui 目录安装依赖并构建
|
|
- run: |
|
|
cd gui
|
|
yarn install
|
|
yarn vscode
|
|
cd ..
|
|
# 最后执行打包
|
|
- run: yarn package
|
|
- persist_to_workspace:
|
|
root: .
|
|
paths:
|
|
- .
|
|
test:
|
|
executor: node-executor
|
|
steps:
|
|
- attach_workspace:
|
|
at: .
|
|
- run:
|
|
name: Install Python
|
|
command: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y python3 python3-pip
|
|
- run:
|
|
name: update workflows
|
|
command: |
|
|
export PYTHONPATH="$PYTHONPATH:$(pwd)/tools/site-packages"
|
|
mkdir -p ~/.chat/workflows
|
|
git clone https://github.com/devchat-ai/workflows.git ~/.chat/workflows/sys
|
|
cd ~/.chat/workflows/sys
|
|
- run:
|
|
name: Run workflow tests
|
|
command: |
|
|
export PYTHONPATH="$PYTHONPATH:$(pwd)/tools/site-packages"
|
|
git config --global user.email "tester@merico.dev"
|
|
git config --global user.name "tester"
|
|
python3 test/workflows/workflow_test.py
|
|
- persist_to_workspace:
|
|
root: .
|
|
paths:
|
|
- .
|
|
publish:
|
|
executor: node-executor
|
|
steps:
|
|
- attach_workspace:
|
|
at: .
|
|
- run:
|
|
name: "Update version in package.json"
|
|
command: |
|
|
sed -i "s/\"version\": \".*\",/\"version\": \"${CIRCLE_TAG:1}\",/" package.json
|
|
- run:
|
|
name: "Publish to Marketplace"
|
|
command: npx vsce publish -p $VSCE_TOKEN --allow-star-activation --pre-release
|
|
workflows:
|
|
version: 2
|
|
build-and-publish:
|
|
jobs:
|
|
- build:
|
|
filters:
|
|
tags:
|
|
only: /.*/
|
|
branches:
|
|
ignore: []
|
|
- test:
|
|
requires:
|
|
- build
|
|
filters:
|
|
tags:
|
|
only: /.*/
|
|
branches:
|
|
ignore: /.*/
|
|
- publish:
|
|
requires:
|
|
- build
|
|
filters:
|
|
tags:
|
|
only: /.*/
|
|
branches:
|
|
ignore: /.*/ |