mirror of
https://github.com/yeslayla/run-gut-tests-action.git
synced 2025-01-13 12:33:41 +01:00
Allow user to change executable path
This commit is contained in:
parent
5af87a011e
commit
2c73dad9ae
@ -30,6 +30,11 @@ steps:
|
|||||||
|
|
||||||
Boolean value of whether or not to run container. Defaults to `true`
|
Boolean value of whether or not to run container. Defaults to `true`
|
||||||
|
|
||||||
|
#### godotExecutable
|
||||||
|
|
||||||
|
Path of Godot binary to call when running GUT tests. Defaults to `godot`
|
||||||
|
|
||||||
|
|
||||||
## Configure GUT
|
## Configure GUT
|
||||||
|
|
||||||
This action requires you to configure GUT using the `.gutconfig.json` file which would be located in the root directory of your project.
|
This action requires you to configure GUT using the `.gutconfig.json` file which would be located in the root directory of your project.
|
||||||
|
@ -8,6 +8,9 @@ inputs:
|
|||||||
useContainer:
|
useContainer:
|
||||||
description: "Boolean value of whether or not to run container."
|
description: "Boolean value of whether or not to run container."
|
||||||
default: true
|
default: true
|
||||||
|
godotExecutable:
|
||||||
|
description: "Path of Godot binary to call when running GUT tests."
|
||||||
|
default: godot
|
||||||
directory:
|
directory:
|
||||||
description: "The name directory to run tests in."
|
description: "The name directory to run tests in."
|
||||||
runs:
|
runs:
|
||||||
|
5
dist/index.js
vendored
5
dist/index.js
vendored
@ -12254,6 +12254,7 @@ try {
|
|||||||
var docker_image = core.getInput('containerImage');
|
var docker_image = core.getInput('containerImage');
|
||||||
var work_dir = core.getInput('directory');
|
var work_dir = core.getInput('directory');
|
||||||
var use_container = core.getInput('useContainer');
|
var use_container = core.getInput('useContainer');
|
||||||
|
var godot_executable = core.getInput('godotExecutable');
|
||||||
|
|
||||||
if(work_dir)
|
if(work_dir)
|
||||||
{
|
{
|
||||||
@ -12274,7 +12275,7 @@ try {
|
|||||||
function onFinished(err, output)
|
function onFinished(err, output)
|
||||||
{
|
{
|
||||||
console.log("Starting image...")
|
console.log("Starting image...")
|
||||||
docker.run(docker_image, ['godot', '-d', '-s', '--path', '/project', 'addons/gut/gut_cmdln.gd'], process.stdout,
|
docker.run(docker_image, [godot_executable, '-d', '-s', '--path', '/project', 'addons/gut/gut_cmdln.gd'], process.stdout,
|
||||||
|
|
||||||
// Mount working directory to `/project`
|
// Mount working directory to `/project`
|
||||||
{ HostConfig: { Binds: [ process.cwd() + ":/project" ] }},
|
{ HostConfig: { Binds: [ process.cwd() + ":/project" ] }},
|
||||||
@ -12303,7 +12304,7 @@ try {
|
|||||||
{
|
{
|
||||||
console.log("Running GUT tests locally");
|
console.log("Running GUT tests locally");
|
||||||
|
|
||||||
var result = spawnSync('godot -d -s --path . addons/gut/gut_cmdln.gd', {
|
var result = spawnSync(`${godot_executable} -d -s --path . addons/gut/gut_cmdln.gd`, {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
shell: true
|
shell: true
|
||||||
});
|
});
|
||||||
|
5
main.js
5
main.js
@ -13,6 +13,7 @@ try {
|
|||||||
var docker_image = core.getInput('containerImage');
|
var docker_image = core.getInput('containerImage');
|
||||||
var work_dir = core.getInput('directory');
|
var work_dir = core.getInput('directory');
|
||||||
var use_container = core.getInput('useContainer');
|
var use_container = core.getInput('useContainer');
|
||||||
|
var godot_executable = core.getInput('godotExecutable');
|
||||||
|
|
||||||
if(work_dir)
|
if(work_dir)
|
||||||
{
|
{
|
||||||
@ -33,7 +34,7 @@ try {
|
|||||||
function onFinished(err, output)
|
function onFinished(err, output)
|
||||||
{
|
{
|
||||||
console.log("Starting image...")
|
console.log("Starting image...")
|
||||||
docker.run(docker_image, ['godot', '-d', '-s', '--path', '/project', 'addons/gut/gut_cmdln.gd'], process.stdout,
|
docker.run(docker_image, [godot_executable, '-d', '-s', '--path', '/project', 'addons/gut/gut_cmdln.gd'], process.stdout,
|
||||||
|
|
||||||
// Mount working directory to `/project`
|
// Mount working directory to `/project`
|
||||||
{ HostConfig: { Binds: [ process.cwd() + ":/project" ] }},
|
{ HostConfig: { Binds: [ process.cwd() + ":/project" ] }},
|
||||||
@ -62,7 +63,7 @@ try {
|
|||||||
{
|
{
|
||||||
console.log("Running GUT tests locally");
|
console.log("Running GUT tests locally");
|
||||||
|
|
||||||
var result = spawnSync('godot -d -s --path . addons/gut/gut_cmdln.gd', {
|
var result = spawnSync(`${godot_executable} -d -s --path . addons/gut/gut_cmdln.gd`, {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
shell: true
|
shell: true
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user