From 7b848cd08aa4f97b1df35666166561d6fc30c5c9 Mon Sep 17 00:00:00 2001 From: Innei Date: Sat, 26 Oct 2024 17:05:27 +0800 Subject: [PATCH] fix: add turbo build in ci Signed-off-by: Innei --- .github/workflows/build.yml | 4 ++-- .github/workflows/lint.yml | 6 ++---- apps/main/package.json | 2 +- turbo.json | 16 +++++++++++++++- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 22fbe2b57..9ce1313ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -106,7 +106,7 @@ jobs: - name: Build if: matrix.os != 'macos-latest' - run: pnpm build + run: turbo run build env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} @@ -117,7 +117,7 @@ jobs: APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} KEYCHAIN_PATH: ${{ runner.temp }}/app-signing.keychain-db - run: pnpm build:macos + run: turbo run build:macos - name: Upload file uses: actions/upload-artifact@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 084484a9e..fe504c652 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,8 +35,6 @@ jobs: run: pnpm install - name: Format, Lint and Typecheck run: | - pnpm run format:check - pnpm run typecheck - pnpm run lint + turbo run format:check typecheck lint - name: Run test - run: pnpm test + run: turbo run test diff --git a/apps/main/package.json b/apps/main/package.json index c14d007c7..184ccf7a5 100644 --- a/apps/main/package.json +++ b/apps/main/package.json @@ -19,7 +19,7 @@ "scripts": { "build": "tsup", "test": "vitest", - "typecheck": "tsup && tsc --noEmit" + "typecheck": "tsc --noEmit" }, "dependencies": { "@egoist/tipc": "0.3.2", diff --git a/turbo.json b/turbo.json index 4646c724c..52fd87189 100644 --- a/turbo.json +++ b/turbo.json @@ -8,7 +8,21 @@ "//#build:web": { "outputs": ["out/**"] }, - "typecheck": {}, + "//#build:macos": { + "outputs": ["dist/**", "out/**"] + }, + "//#format:check": {}, + "//#lint": {}, + "test": {}, + "@follow/electron-main#build": { + "outputs": ["dist/**"] + }, + "typecheck": { + "dependsOn": ["@follow/electron-main#build"] + }, + "@follow/server#build": { + "outputs": ["dist/**"] + }, "dev": { "persistent": true, "cache": false