Skip to content

Commit 2e66993

Browse files
committed
chore: speed up build and test tasks
1 parent a46c017 commit 2e66993

5 files changed

Lines changed: 44 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ jobs:
7575
restore-keys: |
7676
${{ runner.os }}-pnpm-store-v3-
7777
78+
- name: Setup Turbo cache
79+
uses: actions/cache@v5
80+
with:
81+
path: .turbo/cache
82+
key: ${{ runner.os }}-turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
83+
restore-keys: |
84+
${{ runner.os }}-turbo-${{ github.job }}-${{ github.ref_name }}-
85+
${{ runner.os }}-turbo-${{ github.job }}-
86+
7887
- name: Install dependencies
7988
run: pnpm install --frozen-lockfile
8089

@@ -127,11 +136,20 @@ jobs:
127136
restore-keys: |
128137
${{ runner.os }}-pnpm-store-v3-
129138
139+
- name: Setup Turbo cache
140+
uses: actions/cache@v5
141+
with:
142+
path: .turbo/cache
143+
key: ${{ runner.os }}-turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
144+
restore-keys: |
145+
${{ runner.os }}-turbo-${{ github.job }}-${{ github.ref_name }}-
146+
${{ runner.os }}-turbo-${{ github.job }}-
147+
130148
- name: Install dependencies
131149
run: pnpm install --frozen-lockfile
132150

133151
- name: Build packages (excluding docs)
134-
run: pnpm --filter !@objectstack/docs -r build
152+
run: pnpm build
135153

136154
- name: Verify build outputs
137155
run: |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
import { defineConfig } from 'vitest/config';
4+
5+
export default defineConfig({
6+
test: {
7+
environment: 'node',
8+
testTimeout: 10_000,
9+
},
10+
});

packages/types/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313
}
1414
},
1515
"scripts": {
16-
"build": "tsup --config ../../tsup.config.ts"
16+
"build": "tsup --config ../../tsup.config.ts",
17+
"test": "vitest run"
1718
},
1819
"dependencies": {
1920
"@objectstack/spec": "workspace:*"
2021
},
2122
"devDependencies": {
22-
"typescript": "^6.0.3"
23+
"typescript": "^6.0.3",
24+
"vitest": "^4.1.8"
2325
},
2426
"keywords": [
2527
"objectstack",

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

turbo.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
{
22
"$schema": "https://turbo.build/schema.json",
3+
"globalDependencies": ["tsconfig.json", "tsup.config.ts"],
34
"tasks": {
45
"build": {
56
"dependsOn": ["^build"],
67
"outputs": ["dist/**", ".next/**", "!.next/cache/**"]
78
},
89
"test": {
10+
"dependsOn": ["^build"],
11+
"outputs": [],
12+
"inputs": ["$TURBO_DEFAULT$", "!dist/**", "!coverage/**", "!.turbo/**"]
13+
},
14+
"@objectstack/metadata#test": {
915
"dependsOn": ["build"],
10-
"outputs": ["coverage/**"],
11-
"inputs": ["src/**/*.tsx", "src/**/*.ts", "test/**/*.ts", "test/**/*.tsx"]
16+
"outputs": [],
17+
"inputs": ["$TURBO_DEFAULT$", "!dist/**", "!coverage/**", "!.turbo/**"]
1218
},
1319
"test:e2e": {
1420
"dependsOn": ["build"],

0 commit comments

Comments
 (0)