Skip to content

Commit aeb2aa2

Browse files
authored
Merge pull request #218 from KubrickCode/develop/shlee/199
chore: introduce Turborepo build caching
2 parents 07738a9 + 02bf222 commit aeb2aa2

File tree

9 files changed

+3057
-104
lines changed

9 files changed

+3057
-104
lines changed

.github/workflows/lint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ jobs:
4646

4747
- uses: extractions/setup-just@v3
4848

49+
- name: Cache turbo
50+
uses: actions/cache@v4
51+
with:
52+
path: .turbo
53+
key: turbo-lint-ext-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
54+
restore-keys: |
55+
turbo-lint-ext-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-
56+
turbo-lint-ext-${{ runner.os }}-
57+
4958
- name: Install dependencies
5059
run: |
5160
just deps-root
@@ -73,6 +82,15 @@ jobs:
7382

7483
- uses: extractions/setup-just@v3
7584

85+
- name: Cache turbo
86+
uses: actions/cache@v4
87+
with:
88+
path: .turbo
89+
key: turbo-lint-view-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
90+
restore-keys: |
91+
turbo-lint-view-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-
92+
turbo-lint-view-${{ runner.os }}-
93+
7694
- name: Install dependencies
7795
run: |
7896
just deps-root

.github/workflows/test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ jobs:
3838

3939
- uses: extractions/setup-just@v3
4040

41+
- name: Cache turbo
42+
uses: actions/cache@v4
43+
with:
44+
path: .turbo
45+
key: turbo-test-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
46+
restore-keys: |
47+
turbo-test-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-
48+
turbo-test-${{ runner.os }}-
49+
4150
- name: Install dependencies
4251
run: just deps-compact
4352

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
node_modules/
3+
.turbo/
34
.pnpm-store/
45
.env
56
.claude/settings.local.json

.vscodeignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ src/view/
3232

3333
# Root public folder - exclude screenshots
3434
public/screenshots/
35+
public/screenshots_legacy/
3536
public/*.gif
3637

3738
# All node_modules
@@ -50,6 +51,18 @@ src/node_modules/
5051
.travis.yml
5152
.circleci/
5253

54+
# Turborepo
55+
.turbo/
56+
**/.turbo/
57+
turbo.json
58+
59+
# pnpm workspace
60+
pnpm-workspace.yaml
61+
62+
# Playwright test artifacts
63+
playwright-report/
64+
test-results/
65+
5366
# Git
5467
.git/
5568
.gitignore

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"version": "0.9.0",
77
"publisher": "KubrickCode",
88
"license": "MIT",
9+
"packageManager": "pnpm@9.15.0",
910
"repository": {
1011
"type": "git",
1112
"url": "https://github.com/KubrickCode/quick-command-buttons.git"
@@ -344,15 +345,15 @@
344345
}
345346
},
346347
"scripts": {
347-
"build": "pnpm build:view && pnpm build:extension",
348+
"build": "turbo run build",
348349
"build:extension": "node esbuild.config.mjs --production",
349350
"build:extension:dev": "node esbuild.config.mjs",
350351
"build:extension:watch": "node esbuild.config.mjs --watch",
351352
"build:view": "cd src/view && pnpm build",
352353
"compile": "cd src/extension && tsc -p ./",
353354
"dev": "cd src/view && pnpm dev",
354355
"install-package": "code --install-extension quick-command-buttons-$npm_package_version.vsix",
355-
"lint": "pnpm lint:format && pnpm lint:extension && pnpm lint:view",
356+
"lint": "turbo run lint && pnpm lint:config",
356357
"lint:config": "npx prettier --write \"**/*.{json,yml,yaml,md}\"",
357358
"lint:extension": "cd src && npx eslint --fix extension/main.ts internal pkg shared",
358359
"lint:format": "npx prettier --write \"src/{extension,internal,pkg,shared}/**/*.ts\" \"src/view/src/**/*.{ts,tsx}\" \"**/*.{json,yml,yaml,md}\"",
@@ -361,9 +362,9 @@
361362
"package": "pnpm build && vsce package --no-dependencies --allow-star-activation && find . -maxdepth 1 -name '*.vsix' ! -name '*'$npm_package_version'.vsix' -delete",
362363
"prepare": "husky",
363364
"preview": "cd src/view && pnpm preview",
364-
"test": "cd src/extension && jest",
365-
"test:ci": "cd src/extension && jest --ci --coverage --watchAll=false",
366-
"test:coverage": "cd src/extension && jest --coverage",
365+
"test": "turbo run test --filter=quick-command-buttons-extension",
366+
"test:ci": "turbo run test:ci --filter=quick-command-buttons-extension",
367+
"test:coverage": "turbo run test:coverage --filter=quick-command-buttons-extension",
367368
"test:watch": "cd src/extension && jest --watch",
368369
"test:e2e-ui": "cd src/view && pnpm test:e2e-ui",
369370
"test:e2e-ui:report": "cd src/view && pnpm test:e2e-ui:report",
@@ -396,6 +397,7 @@
396397
"prettier": "3.6.2",
397398
"semantic-release": "25.0.2",
398399
"ts-jest": "29.4.1",
400+
"turbo": "2.6.1",
399401
"typescript": "5.8.3",
400402
"typescript-eslint": "8.46.0"
401403
},

0 commit comments

Comments
 (0)