Browse Source

[Chore] Improve frontend ci check (#16335)

* improve frontend ci check
dev
xiangzihao 4 months ago committed by GitHub
parent
commit
0e42635732
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      .github/workflows/frontend.yml
  2. 2
      dolphinscheduler-ui/src/views/resource/components/resource/edit/index.tsx
  3. 5
      dolphinscheduler-ui/src/views/resource/components/resource/edit/use-edit.ts

9
.github/workflows/frontend.yml

@ -69,12 +69,19 @@ jobs:
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: 16 node-version: 16
- name: Compile and Build on ${{ matrix.os }} - name: Code Format Check
run: | run: |
set -x set -x
npm install pnpm@7 -g npm install pnpm@7 -g
pnpm install pnpm install
pnpm run lint pnpm run lint
modified_files=$(git status | grep modified | wc -l)
if [ $modified_files -gt 0 ]; then
echo "Code format check failed! Please run \`pnpm run lint\` to format the code."
exit -1
fi
- name: Compile and Build on ${{ matrix.os }}
run: |
pnpm run build:prod pnpm run build:prod
result: result:
name: Frontend Build name: Frontend Build

2
dolphinscheduler-ui/src/views/resource/components/resource/edit/index.tsx

@ -24,7 +24,7 @@ import { useEdit, useIsDetailPageStore } from './use-edit'
import Card from '@/components/card' import Card from '@/components/card'
import MonacoEditor from '@/components/monaco-editor' import MonacoEditor from '@/components/monaco-editor'
import styles from '../index.module.scss' import styles from '../index.module.scss'
import { useDetailPageStore } from "@/views/resource/components/resource/table/use-table"; import { useDetailPageStore } from '@/views/resource/components/resource/table/use-table'
export default defineComponent({ export default defineComponent({
name: 'ResourceEdit', name: 'ResourceEdit',

5
dolphinscheduler-ui/src/views/resource/components/resource/edit/use-edit.ts

@ -19,7 +19,10 @@ import { useI18n } from 'vue-i18n'
import type { Router } from 'vue-router' import type { Router } from 'vue-router'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useAsyncState } from '@vueuse/core' import { useAsyncState } from '@vueuse/core'
import { updateResourceContent, viewResource } from '@/service/modules/resources' import {
updateResourceContent,
viewResource
} from '@/service/modules/resources'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
export function useEdit(state: any) { export function useEdit(state: any) {

Loading…
Cancel
Save