ci: Improve CI performance (no-changelog) (#7637)

1. Split backend and frontend tests to avoid them running in parallel
2. Enable coverage only on `master`
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-11-07 14:19:39 +01:00
committed by GitHub
parent f748de9567
commit 2f665683fc
8 changed files with 46 additions and 44 deletions

View File

@@ -22,7 +22,7 @@
"lintfix": "eslint src --ext .js,.ts,.vue --fix",
"format": "prettier --write . --ignore-path ../../.prettierignore",
"serve": "cross-env VUE_APP_URL_BASE_API=http://localhost:5678/ vite --host 0.0.0.0 --port 8080 dev",
"test": "vitest run --coverage",
"test": "vitest run",
"test:dev": "vitest"
},
"dependencies": {

View File

@@ -1,12 +1,10 @@
import vue from '@vitejs/plugin-vue';
import { resolve } from 'path';
import { defineConfig, mergeConfig } from 'vite';
import { defineConfig as defineVitestConfig } from 'vitest/config';
import { sentryVitePlugin } from '@sentry/vite-plugin';
import packageJSON from './package.json';
const { coverageReporters } = require('../../jest.config.js');
import { vitestConfig } from '../design-system/vite.config';
const vendorChunks = ['vue', 'vue-router'];
const n8nChunks = ['n8n-workflow', 'n8n-design-system'];
@@ -115,21 +113,5 @@ export default mergeConfig(
},
},
}),
defineVitestConfig({
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/__tests__/setup.ts'],
coverage: {
provider: 'v8',
reporter: coverageReporters,
all: true,
},
css: {
modules: {
classNameStrategy: 'non-scoped',
},
},
},
}),
vitestConfig,
);