Skip to content

Commit 82ad3f7

Browse files
authored
ci(ci): run benchmarks as part of tests (#387)
* ci(ci): run benchmarks as part of tests Signed-off-by: Frazer Smith <[email protected]> * ci(ci): add missing arg * ci(ci): make connections * fix(lib/packages): import with `with` keyword --------- Signed-off-by: Frazer Smith <[email protected]>
1 parent 63452e0 commit 82ad3f7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
run: npm i --ignore-scripts
5151

5252
- name: Run tests
53-
run: npm test
53+
run: npm test && npm start y 1 1 1
5454

5555
automerge:
5656
name: Automerge Dependabot PRs

lib/packages.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import pkgJson from '../package.json' with { type: 'json' }
22
import { createRequire } from 'node:module';
3-
import path from 'node:path';
3+
import { resolve } from 'node:path';
4+
5+
const require = createRequire(import.meta.url);
46

57
const packages = {
68
'0http': { hasRouter: true, package: '0http' },
@@ -33,13 +35,11 @@ const packages = {
3335
'trpc-router': { extra: true, hasRouter: true, package: '@trpc/server' },
3436
}
3537

36-
const require = createRequire(import.meta.url);
37-
3838
const _choices = []
3939
Object.keys(packages).forEach(pkg => {
4040
if (!packages[pkg].version) {
4141
const module = pkgJson.dependencies[pkg] ? pkg : packages[pkg].package
42-
const version = require(path.resolve(`node_modules/${module}/package.json`)).version
42+
const version = require(resolve(`node_modules/${module}/package.json`)).version
4343
packages[pkg].version = version
4444
}
4545
_choices.push(pkg)

0 commit comments

Comments
 (0)