build(workflows): update CI configuration and remove test file
Some checks failed
Lint Pull Request / Lint Pr Title (pull_request) Failing after 4s
Some checks failed
Lint Pull Request / Lint Pr Title (pull_request) Failing after 4s
This commit is contained in:
parent
7ded9bab13
commit
72b5dd18f3
4 changed files with 32 additions and 24 deletions
30
invoke-binary.js
Normal file
30
invoke-binary.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
const childProcess = require('child_process')
|
||||
const path = require('path')
|
||||
|
||||
function runGo() {
|
||||
const goProcess = childProcess.spawnSync(
|
||||
'go',
|
||||
['run', '.'],
|
||||
{
|
||||
cwd: __dirname,
|
||||
stdio: 'inherit',
|
||||
shell: true,
|
||||
},
|
||||
)
|
||||
|
||||
if (goProcess.error) {
|
||||
console.error('Failed to execute `go run .`:', goProcess.error)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
if (goProcess.status !== 0) {
|
||||
console.error(
|
||||
'`go run .` exited with code',
|
||||
goProcess.status,
|
||||
goProcess.stderr ? goProcess.stderr.toString() : '',
|
||||
)
|
||||
process.exit(goProcess.status)
|
||||
}
|
||||
}
|
||||
|
||||
runGo()
|
Loading…
Add table
Add a link
Reference in a new issue