Merge pull request #182 from multica-ai/forrestchang/speed-up-ci-build
ci: parallelize CI jobs and add turbo cache
This commit is contained in:
commit
606bcd31f4
3 changed files with 58 additions and 12 deletions
17
.github/dependabot.yml
vendored
Normal file
17
.github/dependabot.yml
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
open-pull-requests-limit: 10
|
||||
groups:
|
||||
dev-dependencies:
|
||||
dependency-type: development
|
||||
production-dependencies:
|
||||
dependency-type: production
|
||||
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
45
.github/workflows/ci.yml
vendored
45
.github/workflows/ci.yml
vendored
|
|
@ -6,10 +6,13 @@ on:
|
|||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
|
@ -27,12 +30,34 @@ jobs:
|
|||
run: pnpm install
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
pnpm --filter @multica/web lint
|
||||
pnpm --filter @multica/desktop lint
|
||||
run: pnpm --filter @multica/web --filter @multica/desktop lint
|
||||
|
||||
- name: Type check
|
||||
run: pnpm typecheck
|
||||
build-and-typecheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Restore Turbo cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .turbo
|
||||
key: turbo-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
turbo-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}-
|
||||
turbo-${{ runner.os }}-
|
||||
|
||||
- name: Build, type check, and test
|
||||
run: pnpm turbo build typecheck test
|
||||
|
|
|
|||
|
|
@ -18,9 +18,13 @@
|
|||
"inputs": ["src/**", "package.json", "tsconfig.json"],
|
||||
"outputs": []
|
||||
},
|
||||
"test": {
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": ["src/**", "package.json", "tsconfig.json", "vitest.config.*"],
|
||||
"outputs": []
|
||||
},
|
||||
"lint": {
|
||||
"dependsOn": ["^lint"],
|
||||
"inputs": ["src/**", "package.json"],
|
||||
"inputs": ["src/**", "package.json", "eslint.config.*", ".eslintrc.*"],
|
||||
"outputs": []
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue