Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add check step for github action #40

Merged
merged 2 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -50,7 +50,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
Loading