Skip to content

Commit

Permalink
chore: add check step for github action (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby authored Sep 27, 2023
1 parent d5cf47b commit fb20fe2
Show file tree
Hide file tree
Showing 9 changed files with 336 additions and 319 deletions.
47 changes: 45 additions & 2 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,49 @@ on:
- "!**.md"

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: "temurin"
cache: "gradle"
java-version: 17
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/console/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Frontend Dependencies
run: |
./gradlew pnpmInstall
- name: Run code lint check
run: |
./gradlew pnpm_lint
- name: Run TypeScript type check
run: |
./gradlew pnpm_type-check
- name: Run unit test
run: |
./gradlew pnpm_test-unit
build:
runs-on: ubuntu-latest
steps:
Expand All @@ -27,8 +70,8 @@ jobs:
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
cache: 'gradle'
distribution: "temurin"
cache: "gradle"
java-version: 17
- name: Set up Node.js
uses: actions/setup-node@v3
Expand Down
2 changes: 2 additions & 0 deletions console/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ module.exports = {
"@vue/eslint-config-prettier",
],
env: {
node: true,
"vue/setup-compiler-macros": true,
},
rules: {
"vue/no-v-html": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
},
};
6 changes: 6 additions & 0 deletions console/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ declare module "*.md" {
const Component: ComponentOptions;
export default Component;
}

declare module "vue" {
interface ComponentCustomProperties {
$formkit: any;
}
}
4 changes: 2 additions & 2 deletions console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dev": "vite build --watch --mode=development",
"build": "vite build",
"preview": "vite preview --port 4173",
"test:unit": "vitest --environment jsdom",
"test-unit": "vitest --environment jsdom --run",
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
},
Expand Down Expand Up @@ -51,7 +51,7 @@
"unplugin-icons": "^0.15.3",
"unplugin-vue-markdown": "^0.24.3",
"vite": "^4.4.9",
"vitest": "^0.24.5",
"vitest": "^0.34.5",
"vue-tsc": "^1.8.8"
}
}
Loading

0 comments on commit fb20fe2

Please sign in to comment.