Skip to content

Commit f6a7898

Browse files
test
1 parent 05572f8 commit f6a7898

File tree

5 files changed

+33
-44
lines changed

5 files changed

+33
-44
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,38 @@ jobs:
5353
fetch-depth: 0
5454
submodules: true
5555
- uses: pnpm/action-setup@v2
56+
# First, build the entire monorepo with the development Node version (from .nvmrc)
5657
- uses: actions/setup-node@v3
5758
with:
5859
cache: pnpm
59-
node-version: ${{ matrix.node-version }}
60+
node-version-file: .nvmrc
6061
- run: pnpm install --frozen-lockfile --prefer-offline
6162
- run: pnpm moon run :build
6263

64+
# Then, switch to the target Node version and test the examples
65+
- uses: actions/setup-node@v3
66+
with:
67+
cache: pnpm
68+
node-version: ${{ matrix.node-version }}
69+
70+
- name: Install example dependencies
71+
working-directory: examples/${{ matrix.example }}
72+
run: pnpm install --ignore-workspace
73+
6374
- name: Run benchmarks with tinybench-plugin
6475
# use version from `main` branch to always test the latest version, in real projects, use a tag, like `@v2`
6576
uses: CodSpeedHQ/action@main
6677
with:
67-
run: pnpm --filter ${{ matrix.example }} bench-tinybench
78+
run: cd examples/${{ matrix.example }} && pnpm bench-tinybench
6879
env:
6980
CODSPEED_SKIP_UPLOAD: true
7081
CODSPEED_DEBUG: true
82+
7183
- name: Run benchmarks with benchmark.js-plugin
7284
# use version from `main` branch to always test the latest version, in real projects, use a tag, like `@v2`
7385
uses: CodSpeedHQ/action@main
7486
with:
75-
run: pnpm --filter ${{ matrix.example }} bench-benchmark-js
87+
run: cd examples/${{ matrix.example }} && pnpm bench-benchmark-js
7688
env:
7789
CODSPEED_SKIP_UPLOAD: true
7890
CODSPEED_DEBUG: true

examples/with-javascript-esm/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"bench-tinybench": "node tinybench.js"
88
},
99
"devDependencies": {
10-
"@codspeed/benchmark.js-plugin": "file:../../packages/benchmark.js-plugin",
11-
"@codspeed/tinybench-plugin": "file:../../packages/tinybench-plugin",
10+
"@codspeed/benchmark.js-plugin": "link:../../packages/benchmark.js-plugin",
11+
"@codspeed/tinybench-plugin": "link:../../packages/tinybench-plugin",
1212
"benchmark": "^2.1.4",
1313
"tinybench": "^4.0.1"
1414
}

examples/with-typescript-cjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"bench-tinybench": "tsx bench/tinybench/index.bench.ts"
77
},
88
"devDependencies": {
9-
"@codspeed/benchmark.js-plugin": "file:../../packages/benchmark.js-plugin",
10-
"@codspeed/tinybench-plugin": "file:../../packages/tinybench-plugin",
9+
"@codspeed/benchmark.js-plugin": "link:../../packages/benchmark.js-plugin",
10+
"@codspeed/tinybench-plugin": "link:../../packages/tinybench-plugin",
1111
"@types/benchmark": "^2.1.2",
1212
"benchmark": "^2.1.4",
1313
"tsx": "^4.20.5",

examples/with-typescript-simple-cjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"bench-tinybench": "tsx tinybench.ts"
77
},
88
"devDependencies": {
9-
"@codspeed/benchmark.js-plugin": "file:../../packages/benchmark.js-plugin",
10-
"@codspeed/tinybench-plugin": "file:../../packages/tinybench-plugin",
9+
"@codspeed/benchmark.js-plugin": "link:../../packages/benchmark.js-plugin",
10+
"@codspeed/tinybench-plugin": "link:../../packages/tinybench-plugin",
1111
"@types/benchmark": "^2.1.2",
1212
"benchmark": "^2.1.4",
1313
"tsx": "^4.20.5",

pnpm-lock.yaml

Lines changed: 12 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)