-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
integrationTests/node: fix crash on Mac with M1 by using docker
- Loading branch information
1 parent
15040d0
commit 1d922a0
Showing
5 changed files
with
13 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
'use strict'; | ||
|
||
const path = require('path'); | ||
const childProcess = require('child_process'); | ||
|
||
const { dependencies } = require('./package.json'); | ||
const graphqlPackageJSON = require('graphql/package.json'); | ||
|
||
const nodeVersions = Object.keys(dependencies) | ||
.filter((pkg) => pkg.startsWith('node-')) | ||
const nodeVersions = graphqlPackageJSON.engines.node | ||
.split(' || ') | ||
.map((version) => version.replace(/^(\^|>=)/, '')) | ||
.sort((a, b) => b.localeCompare(a)); | ||
|
||
for (const version of nodeVersions) { | ||
console.log(`Testing on ${version} ...`); | ||
console.log(`Testing on node@${version} ...`); | ||
|
||
const nodePath = path.join(__dirname, 'node_modules', version, 'bin/node'); | ||
childProcess.execSync(nodePath + ' index.js', { stdio: 'inherit' }); | ||
childProcess.execSync( | ||
`docker run --rm --volume "$PWD":/usr/src/app -w /usr/src/app node:${version}-slim node ./index.js`, | ||
{ stdio: 'inherit' }, | ||
); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters