Skip to content

Commit

Permalink
chore: small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SoonIter committed Sep 26, 2024
1 parent e9bc0e3 commit 8df8ca3
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 15 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/test-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,13 @@ jobs:
if: steps.changes.outputs.changed == 'true'
run: pnpm run test:artifact

- name: E2E Test (Playwright)
- name: Examples Test
if: steps.changes.outputs.changed == 'true'
run: pnpm run test:e2e
run: pnpm run build:examples

- name: Examples Test
- name: E2E Test (Playwright)
if: steps.changes.outputs.changed == 'true'
run: |
pnpm run build:examples
run: pnpm run test:e2e

- name: Run benchmarks
uses: CodSpeedHQ/action@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ jobs:
if: steps.changes.outputs.changed == 'true'
run: pnpm run test:artifact

- name: E2E Test (Playwright)
if: steps.changes.outputs.changed == 'true'
run: pnpm run test:e2e

- name: Examples Test
if: steps.changes.outputs.changed == 'true'
run: pnpm run build:examples

- name: E2E Test (Playwright)
if: steps.changes.outputs.changed == 'true'
run: pnpm run test:e2e
14 changes: 11 additions & 3 deletions benchmark/index.bench.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import { bench, describe } from 'vitest';
import { getCwdByExample, rslibBuild } from './utils';

describe('express-plugin', () => {
describe('run rslib in examples', () => {
bench(
'rslib build',
'examples/express-plugin',
async () => {
const cwd = getCwdByExample('express-plugin');
await rslibBuild(cwd);
},
{ time: 10 },
{ time: 5 },
);
bench(
'examples/react-component',
async () => {
const cwd = getCwdByExample('react-component');
await rslibBuild(cwd);
},
{ time: 5 },
);
});
4 changes: 1 addition & 3 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
"scripts": {
"benchmark": "vitest bench"
},
"dependencies": {
"react": "^18.3.1"
},
"devDependencies": {
"@codspeed/vitest-plugin": "^3.1.1",
"@e2e/helper": "workspace:*",
"@rslib/tsconfig": "workspace:*",
"typescript": "^5.6.2",
"vitest": "^2.0.5"
}
Expand Down
15 changes: 15 additions & 0 deletions benchmark/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "@rslib/tsconfig/base",
"compilerOptions": {
"outDir": "./dist",
"baseUrl": "./",
"rootDir": "src",
"declaration": true,
"isolatedDeclarations": true,
"composite": true,
"module": "ESNext",
"moduleResolution": "Bundler"
},
"include": ["src"],
"exclude": ["**/node_modules"]
}
95 changes: 95 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8df8ca3

Please sign in to comment.