Skip to content

Commit

Permalink
ci: streamline ci scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
igordanchenko committed Aug 10, 2024
1 parent a328c59 commit 4936df3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,5 @@ jobs:
- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Build
run: npm run build

- name: Lint
run: npm run lint

- name: Test
run: npm run test
- name: Build, Test, Lint
run: npm run ci
10 changes: 2 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,8 @@ jobs:
- name: Install semantic-release extra plugins
run: npm install --save-dev @semantic-release/changelog @semantic-release/github

- name: Build
run: npm run build

- name: Lint
run: npm run lint

- name: Test
run: npm run test
- name: Build, Test, Lint
run: npm run ci

- name: Cleanup
run: npm pkg delete scripts devDependencies
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,13 @@
"build:fixup": "node fixup-dist.js",
"lint": "eslint .",
"test": "npm-run-all test:unit test:types",
"test:ui": "vitest --ui",
"test:unit": "vitest run --coverage",
"test:types": "node test/types",
"dev": "vite --config dev/vite.config.ts"
"dev": "vite --config dev/vite.config.ts",
"dev:build": "vite build --config dev/vite.config.ts",
"dev:preview": "vite preview --config dev/vite.config.ts",
"ci": "npm-run-all build test lint"
},
"peerDependencies": {
"react": ">=16.8.0",
Expand Down
10 changes: 9 additions & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ export default defineConfig({
globals: true,
dir: "test/unit",
environment: "jsdom",
coverage: { include: ["src"] },
coverage: {
all: true,
enabled: true,
include: ["src"],
reporter: [
["text", { skipEmpty: true }],
["html", { skipEmpty: true }],
],
},
setupFiles: "./test/unit/setup.ts",
},
});

0 comments on commit 4936df3

Please sign in to comment.