Skip to content

Commit

Permalink
use turbo
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaosen7 committed Jul 7, 2024
1 parent a17fadd commit ab46333
Show file tree
Hide file tree
Showing 12 changed files with 128 additions and 473 deletions.
75 changes: 36 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,36 @@
name: CI
on:
push:
branches: ["main"]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: 20

- name: Install dependencies
run: corepack enable pnpm && pnpm install --frozen-lockfile

- name: Test
run: pnpm nx run-many -t test

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: 20

- name: Install dependencies
run: corepack enable pnpm && pnpm install --frozen-lockfile

- name: Build
run: pnpm nx connect && pnpm nx build large-file-upload
name: CI

on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]

jobs:
build:
name: Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest
# To use Remote Caching, uncomment the next lines and follow the steps below.
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
TURBO_REMOTE_ONLY: true

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies
run: corepack enable && pnpm install --frozen-lockfile

- name: Type check
run: npx turbo check-types
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,7 @@ dist-storybook/


.nx/cache
.nx/workspace-data
.nx/workspace-data

# turbo
.turbo
1 change: 1 addition & 0 deletions apps/large-file-upload/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const nextConfig = {
*/
output: "standalone",
distDir: "dist",
output: "standalone",
};

export default nextConfig;
2 changes: 1 addition & 1 deletion apps/large-file-upload/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build:next": "next build",
"build:socket-server": "tsup socket-server.ts",
"lint": "next lint",
"typecheck": "npx tsc --noEmit",
"check-types": "npx tsc --noEmit",
"test": "vitest --run"
},
"dependencies": {
Expand Down
3 changes: 1 addition & 2 deletions apps/stackoverflow/libs/shared/components/git-log.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
"use client";

import log from "@/shared/assets/git.log?raw";
import React from "react";
import { IComponentBaseProps } from "../types";
import { mp } from "../utils";

export interface IGitLogProps extends IComponentBaseProps {}

export const GitLog: React.FC<IGitLogProps> = (props) => {
return mp(props, <div className="text-light400_light500 text-sm">{log}</div>);
return mp(props, <div className="text-light400_light500 text-sm">{""}</div>);
};
1 change: 1 addition & 0 deletions apps/stackoverflow/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const nextConfig = {
},
});
},
output: "standalone",
};

export default nextConfig;
4 changes: 2 additions & 2 deletions apps/stackoverflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"test": "vitest --run",
"prisma:studio": "dotenv -e .env.development -- npx prisma studio -b false",
"prisma:sync:dev": "dotenv -e .env.development -- tsx .scripts/sync-prisma.ts",
"typecheck": "npx tsc --noEmit",
"prepare": "npx prisma generate"
"check-types": "npx tsc --noEmit",
"prepare": "tsx ./.scripts/prepare.ts && prisma generate"
},
"prisma": {
"schema": "libs/prisma/schema.prisma",
Expand Down
19 changes: 0 additions & 19 deletions nx.json

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"private": true,
"packageManager": "[email protected]+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a",
"devDependencies": {
"nx": "19.4.1"
"nx": "19.4.1",
"turbo": "^2.0.6"
}
}
64 changes: 64 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ab46333

Please sign in to comment.