mirror of
https://github.com/RhenCloud/Cloud-Home.git
synced 2026-06-11 00:24:56 +08:00
chore: 将 CI 工作流从 Node.js 迁移到 Bun
This commit is contained in:
32
.github/workflows/lint-format.yml
vendored
32
.github/workflows/lint-format.yml
vendored
@@ -15,24 +15,18 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: oven-sh/setup-bun@v2
|
||||||
with:
|
with:
|
||||||
node-version: "24"
|
bun-version: latest
|
||||||
cache: "npm"
|
|
||||||
|
|
||||||
- name: Enable corepack and install npm
|
|
||||||
run: |
|
|
||||||
corepack enable
|
|
||||||
corepack prepare npm@latest --activate
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install --frozen-lockfile
|
run: bun install
|
||||||
|
|
||||||
- name: Run ESLint
|
- name: Run ESLint
|
||||||
run: npm lint
|
run: bun run lint
|
||||||
|
|
||||||
- name: Run Prettier check
|
- name: Run Prettier check
|
||||||
run: npm format:check
|
run: bun run format:check
|
||||||
|
|
||||||
format:
|
format:
|
||||||
name: Auto-format (eslint --fix)
|
name: Auto-format (eslint --fix)
|
||||||
@@ -46,24 +40,18 @@ jobs:
|
|||||||
persist-credentials: true
|
persist-credentials: true
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: oven-sh/setup-bun@v2
|
||||||
with:
|
with:
|
||||||
node-version: "24"
|
bun-version: latest
|
||||||
cache: "npm"
|
|
||||||
|
|
||||||
- name: Enable corepack and install npm
|
|
||||||
run: |
|
|
||||||
corepack enable
|
|
||||||
corepack prepare npm@latest --activate
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install --frozen-lockfile
|
run: bun install
|
||||||
|
|
||||||
- name: Run Prettier --write
|
- name: Run Prettier --write
|
||||||
run: npm format
|
run: bun run format
|
||||||
|
|
||||||
- name: Run ESLint --fix
|
- name: Run ESLint --fix
|
||||||
run: npm lint:fix
|
run: bun run lint:fix
|
||||||
|
|
||||||
- name: Commit & push fixes
|
- name: Commit & push fixes
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user