chore: prepare CI

This commit is contained in:
Lucien Cartier-Tilet 2024-08-08 16:08:40 +02:00
parent c3cd0923c8
commit 5cab3eb32e
Signed by: phundrak
GPG Key ID: 35A9399AF8F1929C
4 changed files with 32 additions and 16 deletions

View File

@ -7,11 +7,13 @@
"dev": "vite", "dev": "vite",
"build": "run-p type-check \"build-only {@}\" --", "build": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview", "preview": "vite preview",
"test:unit": "vitest", "test:unit": "vitest -c vitest.config.ci.ts",
"test:unit:local": "vitest -c vitest.config.local.ts --ui",
"build-only": "vite build", "build-only": "vite build",
"type-check": "vue-tsc --build --force", "type-check": "vue-tsc --build --force",
"format": "prettier --write src/"
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"format": "prettier --write src/",
"format-check": "prettier --check src/"
}, },
"dependencies": { "dependencies": {
"@fontsource/poppins": "^5.0.8", "@fontsource/poppins": "^5.0.8",

14
vitest.config.ci.ts Normal file
View File

@ -0,0 +1,14 @@
import { fileURLToPath } from 'node:url';
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config';
import viteConfig from './vite.config';
export default mergeConfig(
viteConfig,
defineConfig({
test: {
environment: 'jsdom',
exclude: [...configDefaults.exclude, 'e2e/**'],
root: fileURLToPath(new URL('./', import.meta.url)),
},
})
);

14
vitest.config.local.ts Normal file
View File

@ -0,0 +1,14 @@
import { fileURLToPath } from 'node:url';
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config';
import viteConfig from './vite.config';
export default mergeConfig(
viteConfig,
defineConfig({
test: {
environment: 'jsdom',
exclude: [...configDefaults.exclude, 'e2e/**'],
root: fileURLToPath(new URL('./', import.meta.url)),
},
})
);

View File

@ -1,14 +0,0 @@
import { fileURLToPath } from 'node:url'
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config'
import viteConfig from './vite.config'
export default mergeConfig(
viteConfig,
defineConfig({
test: {
environment: 'jsdom',
exclude: [...configDefaults.exclude, 'e2e/*'],
root: fileURLToPath(new URL('./', import.meta.url))
}
})
)