Merge pull request #1 from Kenny628/zhengheng

Update workflow
This commit is contained in:
Kenny628 2023-08-27 20:55:05 +08:00 committed by GitHub
commit fb1ec900fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 15912 additions and 2 deletions

View File

@ -1,4 +1,4 @@
name: Test
name: CI-Worklflow
on:
push:
@ -36,6 +36,33 @@ jobs:
- name: Eslint check
run: pnpm lint:script
build:
name: Build
env:
CI: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.4.0
with:
version: 7
run_install: false
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
unit_test:
name: Unit test
env:

13540
.nyc_output/out.json Normal file

File diff suppressed because one or more lines are too long

View File

@ -13,5 +13,9 @@ export default defineConfig({
framework: 'vue',
bundler: 'vite',
},
setupNodeEvents(on, config) {
require('@cypress/code-coverage/task')(on, config)
return config;
}
},
})

View File

@ -17,6 +17,7 @@
// ***********************************************************
import './commands'
import type { StyleOptions } from '@cypress/mount-utils'
import '@cypress/code-coverage/support'
import type { MountingOptions } from '@vue/test-utils'
import { mount } from 'cypress/vue'
import registerGlobalComponents from 'src/plugins/global-components'

View File

@ -27,6 +27,7 @@
"vue-router": "^4.1.6"
},
"devDependencies": {
"@cypress/code-coverage": "^3.11.0",
"@cypress/vue": "^5.0.3",
"@mutoe/eslint-config-preset-vue": "~2.1.2",
"@pinia/testing": "^0.0.14",
@ -45,6 +46,7 @@
"swagger-typescript-api": "^12.0.2",
"typescript": "~4.9.4",
"vite": "^4.0.3",
"vite-plugin-istanbul": "^5.0.0",
"vue-tsc": "^1.0.19"
},
"lint-staged": {

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@ import { fileURLToPath, URL } from 'url'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import analyzer from 'rollup-plugin-analyzer'
import istanbul from 'vite-plugin-istanbul'
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
@ -13,5 +13,12 @@ export default defineConfig({
plugins: [
vue(),
analyzer({ summaryOnly: true }),
istanbul({
include: 'src/*',
exclude: ['node_modules'],
extension: ['.js', '.ts', '.vue'],
requireEnv: false,
forceBuildInstrument: Boolean(process.env.INSTRUMENT_BUILD)
}),
],
})