Skip to content

Commit bfc8e5a

Browse files
authored
pin bun and deno versions within integration script (#4455)
instead of within each project follow-on to #4454
1 parent 927e5a5 commit bfc8e5a

File tree

7 files changed

+19
-8
lines changed

7 files changed

+19
-8
lines changed

integrationTests/conditions/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ for (const { version, moduleSync } of nodeTests) {
2020

2121
console.log('Testing on bun (moduleSync: true) ...');
2222
childProcess.execSync(
23-
`docker run --rm --volume "$PWD":/usr/src/app -w /usr/src/app --env MODULE_SYNC=true oven/bun:alpine bun ./check.mjs`,
23+
`docker run --rm --volume "$PWD":/usr/src/app -w /usr/src/app --env MODULE_SYNC=true oven/bun:"$BUN_VERSION"-slim bun ./check.mjs`,
2424
{ stdio: 'inherit' },
2525
);
2626

2727
console.log('Testing on deno (moduleSync: false) ...');
2828
childProcess.execSync(
29-
`docker run --rm --volume "$PWD":/usr/src/app -w /usr/src/app --env MODULE_SYNC=false denoland/deno:alpine-2.4.1 deno run --allow-read --allow-env ./check.mjs`,
29+
`docker run --rm --volume "$PWD":/usr/src/app -w /usr/src/app --env MODULE_SYNC=false denoland/deno:alpine-"$DENO_VERSION" deno run --allow-read --allow-env ./check.mjs`,
3030
{ stdio: 'inherit' },
3131
);

integrationTests/dev-bun/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"description": "graphql-js development mode should work with Bun",
33
"private": true,
44
"scripts": {
5-
"test": "docker run --rm --volume \"$PWD:/usr/src/app\" -w /usr/src/app oven/bun:1.2.18-slim bun test.js"
5+
"test": "docker run --rm --volume \"$PWD\":/usr/src/app -w /usr/src/app oven/bun:\"$BUN_VERSION\"-slim bun test.js"
66
},
77
"dependencies": {
88
"graphql": "file:../graphql.tgz"

integrationTests/dev-deno/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"description": "graphql-js development mode should work with Deno",
33
"private": true,
44
"scripts": {
5-
"test": "docker run --rm --volume \"$PWD:/usr/src/app\" -w /usr/src/app denoland/deno:alpine-2.4.1 deno run --allow-env=NODE_ENV test.js"
5+
"test": "docker run --rm --volume \"$PWD\":/usr/src/app -w /usr/src/app denoland/deno:alpine-\"$DENO_VERSION\" deno run --allow-env=NODE_ENV test.js"
66
},
77
"dependencies": {
88
"graphql": "file:../graphql.tgz"

integrationTests/prod-bun/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"description": "graphql-js production mode should work with Bun",
33
"private": true,
44
"scripts": {
5-
"test": "docker run --rm --volume \"$PWD:/usr/src/app\" -w /usr/src/app oven/bun:1.2.18-slim bun --define process.env.NODE_ENV='\"production\"' test.js"
5+
"test": "docker run --rm --volume \"$PWD\":/usr/src/app -w /usr/src/app oven/bun:\"$BUN_VERSION\"-slim bun --define process.env.NODE_ENV='\"production\"' test.js"
66
},
77
"dependencies": {
88
"graphql": "file:../graphql.tgz"

integrationTests/prod-deno/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"description": "graphql-js production mode should work with Deno",
33
"private": true,
44
"scripts": {
5-
"test": "docker run --rm --volume \"$PWD:/usr/src/app\" -w /usr/src/app denoland/deno:alpine-2.4.1 deno run --allow-env --preload env-shim.js test.js"
5+
"test": "docker run --rm --volume \"$PWD\":/usr/src/app -w /usr/src/app denoland/deno:alpine-\"$DENO_VERSION\" deno run --allow-env --preload env-shim.js test.js"
66
},
77
"dependencies": {
88
"graphql": "file:../graphql.tgz"

integrationTests/ts/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ for (const version of tsVersions) {
1515

1616
console.log('Testing on deno ...');
1717
childProcess.execSync(
18-
`docker run --rm --volume "$PWD":/usr/src/app -w /usr/src/app denoland/deno:alpine-2.4.1 deno check`,
18+
`docker run --rm --volume "$PWD":/usr/src/app -w /usr/src/app denoland/deno:alpine-"$DENO_VERSION" deno check`,
1919
{ stdio: 'inherit' },
2020
);
2121

resources/integration-test.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import { describe, it } from 'mocha';
44

55
import { localRepoPath, makeTmpDir, npm, readPackageJSON } from './utils.js';
66

7+
const BUN_VERSION = '1.2.18';
8+
const DENO_VERSION = '2.4.1';
9+
710
describe('Integration Tests', () => {
811
const { tmpDirPath } = makeTmpDir('graphql-js-integrationTmp');
912
fs.cpSync(localRepoPath('integrationTests'), tmpDirPath(), {
@@ -31,7 +34,15 @@ describe('Integration Tests', () => {
3134
it(packageJSON.description, () => {
3235
// TODO: figure out a way to run it with --ignore-scripts
3336
npm({ cwd: projectPath, quiet: true }).install();
34-
npm({ cwd: projectPath, quiet: true }).run('test');
37+
npm({
38+
cwd: projectPath,
39+
quiet: true,
40+
env: {
41+
...process.env,
42+
BUN_VERSION,
43+
DENO_VERSION,
44+
},
45+
}).run('test');
3546
}).timeout(120000);
3647
}
3748

0 commit comments

Comments
 (0)