mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-19 12:24:46 +08:00
chron(ci):setup the lint check in frontend (#1276)
* chron(ci):setup the lint check in frontend * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(ci): correct lint-check.yml indentation, add Python 3.12 setup, upgrade checkout to v4 (#1277) * Initial plan * Fix lint-check.yml: fix steps indentation, add Python 3.12 setup, upgrade checkout to v4 Co-authored-by: WillemJiang <219644+WillemJiang@users.noreply.github.com> Agent-Logs-Url: https://github.com/bytedance/deer-flow/sessions/7b4d4fad-f024-453a-9f93-5fc2dd83b471 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: WillemJiang <219644+WillemJiang@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
7
.github/workflows/backend-unit-tests.yml
vendored
7
.github/workflows/backend-unit-tests.yml
vendored
@@ -10,6 +10,9 @@ concurrency:
|
|||||||
group: unit-tests-${{ github.event.pull_request.number || github.ref }}
|
group: unit-tests-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
backend-unit-tests:
|
backend-unit-tests:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
@@ -32,10 +35,6 @@ jobs:
|
|||||||
working-directory: backend
|
working-directory: backend
|
||||||
run: uv sync --group dev
|
run: uv sync --group dev
|
||||||
|
|
||||||
- name: Lint backend
|
|
||||||
working-directory: backend
|
|
||||||
run: make lint
|
|
||||||
|
|
||||||
- name: Run unit tests of backend
|
- name: Run unit tests of backend
|
||||||
working-directory: backend
|
working-directory: backend
|
||||||
run: make test
|
run: make test
|
||||||
|
|||||||
71
.github/workflows/lint-check.yml
vendored
Normal file
71
.github/workflows/lint-check.yml
vendored
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
name: Lint Check
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ 'main' ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ '*' ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.12'
|
||||||
|
|
||||||
|
- name: Install the latest version of uv
|
||||||
|
uses: astral-sh/setup-uv@v7
|
||||||
|
with:
|
||||||
|
version: "latest"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
working-directory: backend
|
||||||
|
run: |
|
||||||
|
uv sync --group dev
|
||||||
|
|
||||||
|
- name: Lint backend
|
||||||
|
working-directory: backend
|
||||||
|
run: make lint
|
||||||
|
|
||||||
|
lint-frontend:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '22'
|
||||||
|
|
||||||
|
- name: Enable Corepack
|
||||||
|
run: corepack enable
|
||||||
|
|
||||||
|
- name: Use pinned pnpm version
|
||||||
|
run: corepack prepare pnpm@10.26.2 --activate
|
||||||
|
|
||||||
|
- name: Install frontend dependencies
|
||||||
|
run: |
|
||||||
|
cd frontend
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Run frontend linting
|
||||||
|
run: |
|
||||||
|
cd frontend
|
||||||
|
pnpm lint
|
||||||
|
|
||||||
|
- name: Check TypeScript types
|
||||||
|
run: |
|
||||||
|
cd frontend
|
||||||
|
pnpm typecheck
|
||||||
|
|
||||||
|
- name: Build frontend
|
||||||
|
run: |
|
||||||
|
cd frontend
|
||||||
|
BETTER_AUTH_SECRET=local-dev-secret pnpm build
|
||||||
@@ -26,6 +26,7 @@ import {
|
|||||||
} from "@/components/ui/dialog";
|
} from "@/components/ui/dialog";
|
||||||
import { useI18n } from "@/core/i18n/hooks";
|
import { useI18n } from "@/core/i18n/hooks";
|
||||||
import { useGlobalShortcuts } from "@/hooks/use-global-shortcuts";
|
import { useGlobalShortcuts } from "@/hooks/use-global-shortcuts";
|
||||||
|
|
||||||
import { SettingsDialog } from "./settings";
|
import { SettingsDialog } from "./settings";
|
||||||
|
|
||||||
export function CommandPalette() {
|
export function CommandPalette() {
|
||||||
|
|||||||
Reference in New Issue
Block a user