Skip to content

Commit

Permalink
chore: upgrade to turbo v2 and reduce ci quality gate runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
hiento09 committed Dec 23, 2024
1 parent 7140978 commit a5e32d8
Show file tree
Hide file tree
Showing 26 changed files with 113 additions and 58 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/jan-electron-linter-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ jobs:
make test
env:
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
# TURBO_API: '${{ secrets.TURBO_API }}'
# TURBO_TEAM: 'macos'
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
TURBO_API: '${{ secrets.TURBO_API }}'
TURBO_TEAM: 'macos'
TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'

test-on-macos-pr-target:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
Expand Down Expand Up @@ -185,10 +185,10 @@ jobs:
npm config set registry ${{ secrets.NPM_PROXY }} --global
yarn config set registry ${{ secrets.NPM_PROXY }} --global
make test
# env:
# TURBO_API: '${{ secrets.TURBO_API }}'
# TURBO_TEAM: 'windows'
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
env:
TURBO_API: '${{ secrets.TURBO_API }}'
TURBO_TEAM: 'windows'
TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
test-on-windows-pr:
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
runs-on: windows-desktop-default-windows-security
Expand Down Expand Up @@ -233,10 +233,10 @@ jobs:
npm config set registry ${{ secrets.NPM_PROXY }} --global
yarn config set registry ${{ secrets.NPM_PROXY }} --global
make test
# env:
# TURBO_API: '${{ secrets.TURBO_API }}'
# TURBO_TEAM: 'windows'
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
env:
TURBO_API: '${{ secrets.TURBO_API }}'
TURBO_TEAM: 'windows'
TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'

test-on-windows-pr-target:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
Expand Down Expand Up @@ -314,10 +314,10 @@ jobs:
npm config set registry ${{ secrets.NPM_PROXY }} --global
yarn config set registry ${{ secrets.NPM_PROXY }} --global
make test
# env:
# TURBO_API: '${{ secrets.TURBO_API }}'
# TURBO_TEAM: 'linux'
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
env:
TURBO_API: '${{ secrets.TURBO_API }}'
TURBO_TEAM: 'linux'
TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'

- uses: actions/upload-artifact@v4
if: always()
Expand Down Expand Up @@ -361,10 +361,10 @@ jobs:
make lint
yarn build:test
yarn test:coverage
# env:
# TURBO_API: '${{ secrets.TURBO_API }}'
# TURBO_TEAM: 'linux'
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
env:
TURBO_API: '${{ secrets.TURBO_API }}'
TURBO_TEAM: 'linux'
TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'

- name: Generate Code Coverage report
id: code-coverage
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ install-and-build: build-joi
ifeq ($(OS),Windows_NT)
yarn config set network-timeout 300000
endif
yarn global add turbo@1.13.2
yarn global add turbo@2.3.3
yarn build:core
yarn build:server
yarn install
Expand Down
3 changes: 2 additions & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@
"dependencies": {
"rxjs": "^7.8.1",
"ulidx": "^2.3.0"
}
},
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,6 @@
},
"installConfig": {
"hoistingLimits": "workspaces"
}
},
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/assistant-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@
"bundleDependencies": [
"@janhq/core",
"hnswlib-node"
]
],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/conversational-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
"package.json",
"README.md"
],
"bundleDependencies": []
"bundleDependencies": [],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/inference-anthropic-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@
],
"bundleDependencies": [
"fetch-retry"
]
],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/inference-cohere-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
],
"bundleDependencies": [
"fetch-retry"
]
],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/inference-cortex-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,6 @@
"@janhq/core",
"decompress",
"cpu-instructions"
]
],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/inference-groq-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@
],
"bundleDependencies": [
"fetch-retry"
]
],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/inference-martian-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
],
"bundleDependencies": [
"fetch-retry"
]
],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/inference-mistral-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
],
"bundleDependencies": [
"fetch-retry"
]
],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/inference-nvidia-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
],
"bundleDependencies": [
"fetch-retry"
]
],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/inference-openai-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
],
"bundleDependencies": [
"fetch-retry"
]
],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/inference-openrouter-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
],
"bundleDependencies": [
"fetch-retry"
]
],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/inference-triton-trtllm-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
],
"bundleDependencies": [
"fetch-retry"
]
],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/model-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
"ky": "^1.7.2",
"p-queue": "^8.0.1"
},
"bundleDependencies": []
"bundleDependencies": [],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/monitoring-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@
"bundleDependencies": [
"node-os-utils",
"@janhq/core"
]
],
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"nohoist": [
"**"
]
}
},
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion extensions/tensorrt-llm-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,6 @@
"decompress",
"@janhq/core",
"terminate"
]
],
"packageManager": "yarn@1.22.19"
}
18 changes: 13 additions & 5 deletions extensions/turbo.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**"]
"dependsOn": [
"^build"
],
"outputs": [
"dist/**"
]
},
"build:publish": {
"dependsOn": ["build"],
"outputs": ["**.tgz"]
"dependsOn": [
"build"
],
"outputs": [
"**.tgz"
]
},
"dev": {
"cache": false
Expand Down
3 changes: 2 additions & 1 deletion joi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-typescript2": "^0.36.0"
}
},
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@
"run-script-os": "^1.1.6",
"wait-on": "^7.0.1"
},
"version": "0.0.0"
"version": "0.0.0",
"packageManager": "yarn@1.22.19"
}
3 changes: 2 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@
"eslint-plugin-react": "^7.34.0",
"run-script-os": "^1.1.6",
"typescript": "^5.3.3"
}
},
"packageManager": "yarn@1.22.19"
}
47 changes: 36 additions & 11 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,68 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"tasks": {
"build": {
"outputs": [".next/**", "!.next/cache/**", "dist/**"]
"outputs": [
".next/**",
"!.next/cache/**",
"dist/**"
]
},
"dev": {
"cache": false
},
"@janhq/web#dev": {
"cache": false,
"persistent": true,
"dependsOn": ["@janhq/core#build", "@janhq/joi#build"]
"dependsOn": [
"@janhq/core#build",
"@janhq/joi#build"
]
},
"@janhq/server#build": {
"outputs": ["dist/**"],
"dependsOn": ["@janhq/core#build"]
"outputs": [
"dist/**"
],
"dependsOn": [
"@janhq/core#build"
]
},
"jan#dev": {
"cache": false,
"persistent": true,
"dependsOn": ["@janhq/core#build", "@janhq/server#build"]
"dependsOn": [
"@janhq/core#build",
"@janhq/server#build"
]
},
"@janhq/core#build": {
"outputs": ["dist/**"]
"outputs": [
"dist/**"
]
},
"@janhq/web#build": {
"outputs": ["out/**"],
"dependsOn": ["@janhq/core#build", "@janhq/joi#build"]
"outputs": [
"out/**"
],
"dependsOn": [
"@janhq/core#build",
"@janhq/joi#build"
]
},
"jan#build": {
"outputs": ["dist/**"],
"outputs": [
"dist/**"
],
"dependsOn": [
"@janhq/core#build",
"@janhq/server#build",
"@janhq/web#build"
]
},
"jan#build:test": {
"outputs": ["dist/**"],
"outputs": [
"dist/**"
],
"cache": false,
"dependsOn": [
"@janhq/core#build",
Expand Down
3 changes: 2 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@
},
"resolutions": {
"highlight.js": "11.10.0"
}
},
"packageManager": "yarn@1.22.19"
}

0 comments on commit a5e32d8

Please sign in to comment.