unity-test-runner/action.yml

79 lines
3.1 KiB
YAML
Raw Normal View History

2019-11-30 15:36:27 +00:00
name: 'Unity - Test runner'
author: Webber Takken <webber@takken.io>
description: 'Run tests for any Unity project.'
2020-01-29 20:49:35 +00:00
inputs:
unityVersion:
required: false
default: 'auto'
Add Feature to test Unity Packages (#164) * (should fail) add jq install to docker image * (might fail) remove rm rf call * move things around to try to fix test * Revert "(might fail) remove rm rf call" This reverts commit 22f74ebca711c6c66d7b9d217954a19edc7db5fb. * remove silent setting from docker test * Fix failing test's Docker image * Add new input and basic test * Add test package; start using jq cli * Use test package in test workflow * Create temporary Unity Project and run tests * Test removing jq install from Dockerfile * Revert "Test removing jq install from Dockerfile" This reverts commit 6aa7a6f44365495960f1e470e9fcf90f369683f0. * Remove mkdir call * remove duplicate command * add packageMode option back in * build changes * check for apt-get before installing jq * change apt-get version check message * spelling and documentation fixes * add working example unity package with tests * add temp pwd call to help figure out absolute pathing * fix workflow package location * add jq to add package to temp project packages * try fixing jq calls * clean up jq calls, fix variable expansion * try renaming jq args * try using different arg syntax for jq * try wrapping args in parentheses * try using double quotes only * try changing up quoting * try properly using string interpolation * try removing colon * add string interpolation to key * omit double quotes from jq call to retrieve package name * clean up logging * add rest of workflow tests * Revert "add rest of workflow tests" This reverts commit c0bb008b2c9740559dec0fb7374428d45ff46df8. * add play mode test without cache * add package mode all mode workflow step * add consecutive ppackage mode workflow step * add package mode "like in the readme" test * fix workflow syntax error * try to fix syntax error again * use correct folder * *hopefully actually* use correct package path * try adding caching to "readme" test * remove caching/mentions of caching from package mode tests * fix artifacts paths * fix artifacts pathing and names * fix combined artifacts for package mode * clean up documentation and exit code * clarify allowed docker images for packageMode * update README to mention Unity packages * move package name validation to TS part of action * improve logging for temp project creation failure * make husky hook executable * add error for missing tests folder * update docs to reflect unsupported packages * remove jq install * Revert "remove jq install" This reverts commit bd35ac8f6f48c7c01456e70855d4109dba8cffdf. * TEMP log image in use * Revert "TEMP log image in use" This reverts commit 95722dcab432168201bf69e20ad7bf8b8a48d3fa. * Revert "Revert "remove jq install"" This reverts commit e3bac048b1dfb51270b469c0a5e649e9c7a8acce. * TEMP list installed packages * Revert "TEMP list installed packages" This reverts commit db9c07da38fd4cdf1f738696766fda1706e8e8e9. * TEMP log project's manifest * add code coverage package to generated project * remove temp project manifest log * add coverage to package mode tests * update name of package coverage steps * add codecoverage dependency to test package * Revert "add codecoverage dependency to test package" This reverts commit 4b2c03069d3aacf4b3fc683b70dcd5019778a5c7. * add assembly filters for coverage * TEMP console log project folder * Revert "TEMP console log project folder" This reverts commit 411ec51817f805f1177681a619e51384ff66e808. * add logic to copy package to folder without activation file * fix false positive activation file detection * fix improper bash "if" formatting * TEMP remove conditional for package copying * Revert "TEMP remove conditional for package copying" This reverts commit 4f12d83889dbbfe24d1c13ba2e1d95e3aaff9693. * Revert "fix improper bash "if" formatting" This reverts commit acb975bcea47fc55f2cb6192b0adfc8640379143. * Revert "fix false positive activation file detection" This reverts commit 580c9c14a019bc4a16ca265af7be75cb04102b8f. * Revert "add logic to copy package to folder without activation file" This reverts commit b20d994b5d0c745b58c3a22c92fb757211591f6f. * run yarn build * move package mode check lower in the file * throw error if unity version is auto in package mode * fix unity version error wording * try deleting activate license file * try logging hidden package files * try deleting all non-package files * fix license activation files deletion * scrap file removals and print dir permissions * log permissions for package folder * Add packageMode inputs to main * fix fs mocks and run yarn build * fix documentation and add error message for missing jq * add clarification on package mode caveats * fix line endings problem (?) * Revert "fix line endings problem (?)" This reverts commit 1cba302bc47081c4958c01bcf13092517679b7af. * Revert "add clarification on package mode caveats" This reverts commit fb62d36ba1cfebaabfa9eced695a203c68a0662c. * Revert "fix documentation and add error message for missing jq" This reverts commit 0df3ab6b88fe7f787c692d1b3f3f857636e166be. * Redo the input docs fixes * Redo the jq presence test * update readme to indicate package mode caveats * fix wording on coverageOptions * one more wording fix on coverageOptions * move sample package to example.com domain --------- Co-authored-by: Aaron Trudeau <120415438+trudeaua-vividream-software@users.noreply.github.com>
2023-07-03 15:09:20 +00:00
description: 'Version of unity to use for testing the project. Use "auto" to get from your ProjectSettings/ProjectVersion.txt. ⚠️ If testing a Unity Package, this field is required and cannot be set to "auto".'
2020-11-26 08:17:42 +00:00
customImage:
required: false
default: ''
Add Feature to test Unity Packages (#164) * (should fail) add jq install to docker image * (might fail) remove rm rf call * move things around to try to fix test * Revert "(might fail) remove rm rf call" This reverts commit 22f74ebca711c6c66d7b9d217954a19edc7db5fb. * remove silent setting from docker test * Fix failing test's Docker image * Add new input and basic test * Add test package; start using jq cli * Use test package in test workflow * Create temporary Unity Project and run tests * Test removing jq install from Dockerfile * Revert "Test removing jq install from Dockerfile" This reverts commit 6aa7a6f44365495960f1e470e9fcf90f369683f0. * Remove mkdir call * remove duplicate command * add packageMode option back in * build changes * check for apt-get before installing jq * change apt-get version check message * spelling and documentation fixes * add working example unity package with tests * add temp pwd call to help figure out absolute pathing * fix workflow package location * add jq to add package to temp project packages * try fixing jq calls * clean up jq calls, fix variable expansion * try renaming jq args * try using different arg syntax for jq * try wrapping args in parentheses * try using double quotes only * try changing up quoting * try properly using string interpolation * try removing colon * add string interpolation to key * omit double quotes from jq call to retrieve package name * clean up logging * add rest of workflow tests * Revert "add rest of workflow tests" This reverts commit c0bb008b2c9740559dec0fb7374428d45ff46df8. * add play mode test without cache * add package mode all mode workflow step * add consecutive ppackage mode workflow step * add package mode "like in the readme" test * fix workflow syntax error * try to fix syntax error again * use correct folder * *hopefully actually* use correct package path * try adding caching to "readme" test * remove caching/mentions of caching from package mode tests * fix artifacts paths * fix artifacts pathing and names * fix combined artifacts for package mode * clean up documentation and exit code * clarify allowed docker images for packageMode * update README to mention Unity packages * move package name validation to TS part of action * improve logging for temp project creation failure * make husky hook executable * add error for missing tests folder * update docs to reflect unsupported packages * remove jq install * Revert "remove jq install" This reverts commit bd35ac8f6f48c7c01456e70855d4109dba8cffdf. * TEMP log image in use * Revert "TEMP log image in use" This reverts commit 95722dcab432168201bf69e20ad7bf8b8a48d3fa. * Revert "Revert "remove jq install"" This reverts commit e3bac048b1dfb51270b469c0a5e649e9c7a8acce. * TEMP list installed packages * Revert "TEMP list installed packages" This reverts commit db9c07da38fd4cdf1f738696766fda1706e8e8e9. * TEMP log project's manifest * add code coverage package to generated project * remove temp project manifest log * add coverage to package mode tests * update name of package coverage steps * add codecoverage dependency to test package * Revert "add codecoverage dependency to test package" This reverts commit 4b2c03069d3aacf4b3fc683b70dcd5019778a5c7. * add assembly filters for coverage * TEMP console log project folder * Revert "TEMP console log project folder" This reverts commit 411ec51817f805f1177681a619e51384ff66e808. * add logic to copy package to folder without activation file * fix false positive activation file detection * fix improper bash "if" formatting * TEMP remove conditional for package copying * Revert "TEMP remove conditional for package copying" This reverts commit 4f12d83889dbbfe24d1c13ba2e1d95e3aaff9693. * Revert "fix improper bash "if" formatting" This reverts commit acb975bcea47fc55f2cb6192b0adfc8640379143. * Revert "fix false positive activation file detection" This reverts commit 580c9c14a019bc4a16ca265af7be75cb04102b8f. * Revert "add logic to copy package to folder without activation file" This reverts commit b20d994b5d0c745b58c3a22c92fb757211591f6f. * run yarn build * move package mode check lower in the file * throw error if unity version is auto in package mode * fix unity version error wording * try deleting activate license file * try logging hidden package files * try deleting all non-package files * fix license activation files deletion * scrap file removals and print dir permissions * log permissions for package folder * Add packageMode inputs to main * fix fs mocks and run yarn build * fix documentation and add error message for missing jq * add clarification on package mode caveats * fix line endings problem (?) * Revert "fix line endings problem (?)" This reverts commit 1cba302bc47081c4958c01bcf13092517679b7af. * Revert "add clarification on package mode caveats" This reverts commit fb62d36ba1cfebaabfa9eced695a203c68a0662c. * Revert "fix documentation and add error message for missing jq" This reverts commit 0df3ab6b88fe7f787c692d1b3f3f857636e166be. * Redo the input docs fixes * Redo the jq presence test * update readme to indicate package mode caveats * fix wording on coverageOptions * one more wording fix on coverageOptions * move sample package to example.com domain --------- Co-authored-by: Aaron Trudeau <120415438+trudeaua-vividream-software@users.noreply.github.com>
2023-07-03 15:09:20 +00:00
description: 'Specific docker image that should be used for testing the project. If packageMode is true, this image must have jq installed.'
projectPath:
required: false
Add Feature to test Unity Packages (#164) * (should fail) add jq install to docker image * (might fail) remove rm rf call * move things around to try to fix test * Revert "(might fail) remove rm rf call" This reverts commit 22f74ebca711c6c66d7b9d217954a19edc7db5fb. * remove silent setting from docker test * Fix failing test's Docker image * Add new input and basic test * Add test package; start using jq cli * Use test package in test workflow * Create temporary Unity Project and run tests * Test removing jq install from Dockerfile * Revert "Test removing jq install from Dockerfile" This reverts commit 6aa7a6f44365495960f1e470e9fcf90f369683f0. * Remove mkdir call * remove duplicate command * add packageMode option back in * build changes * check for apt-get before installing jq * change apt-get version check message * spelling and documentation fixes * add working example unity package with tests * add temp pwd call to help figure out absolute pathing * fix workflow package location * add jq to add package to temp project packages * try fixing jq calls * clean up jq calls, fix variable expansion * try renaming jq args * try using different arg syntax for jq * try wrapping args in parentheses * try using double quotes only * try changing up quoting * try properly using string interpolation * try removing colon * add string interpolation to key * omit double quotes from jq call to retrieve package name * clean up logging * add rest of workflow tests * Revert "add rest of workflow tests" This reverts commit c0bb008b2c9740559dec0fb7374428d45ff46df8. * add play mode test without cache * add package mode all mode workflow step * add consecutive ppackage mode workflow step * add package mode "like in the readme" test * fix workflow syntax error * try to fix syntax error again * use correct folder * *hopefully actually* use correct package path * try adding caching to "readme" test * remove caching/mentions of caching from package mode tests * fix artifacts paths * fix artifacts pathing and names * fix combined artifacts for package mode * clean up documentation and exit code * clarify allowed docker images for packageMode * update README to mention Unity packages * move package name validation to TS part of action * improve logging for temp project creation failure * make husky hook executable * add error for missing tests folder * update docs to reflect unsupported packages * remove jq install * Revert "remove jq install" This reverts commit bd35ac8f6f48c7c01456e70855d4109dba8cffdf. * TEMP log image in use * Revert "TEMP log image in use" This reverts commit 95722dcab432168201bf69e20ad7bf8b8a48d3fa. * Revert "Revert "remove jq install"" This reverts commit e3bac048b1dfb51270b469c0a5e649e9c7a8acce. * TEMP list installed packages * Revert "TEMP list installed packages" This reverts commit db9c07da38fd4cdf1f738696766fda1706e8e8e9. * TEMP log project's manifest * add code coverage package to generated project * remove temp project manifest log * add coverage to package mode tests * update name of package coverage steps * add codecoverage dependency to test package * Revert "add codecoverage dependency to test package" This reverts commit 4b2c03069d3aacf4b3fc683b70dcd5019778a5c7. * add assembly filters for coverage * TEMP console log project folder * Revert "TEMP console log project folder" This reverts commit 411ec51817f805f1177681a619e51384ff66e808. * add logic to copy package to folder without activation file * fix false positive activation file detection * fix improper bash "if" formatting * TEMP remove conditional for package copying * Revert "TEMP remove conditional for package copying" This reverts commit 4f12d83889dbbfe24d1c13ba2e1d95e3aaff9693. * Revert "fix improper bash "if" formatting" This reverts commit acb975bcea47fc55f2cb6192b0adfc8640379143. * Revert "fix false positive activation file detection" This reverts commit 580c9c14a019bc4a16ca265af7be75cb04102b8f. * Revert "add logic to copy package to folder without activation file" This reverts commit b20d994b5d0c745b58c3a22c92fb757211591f6f. * run yarn build * move package mode check lower in the file * throw error if unity version is auto in package mode * fix unity version error wording * try deleting activate license file * try logging hidden package files * try deleting all non-package files * fix license activation files deletion * scrap file removals and print dir permissions * log permissions for package folder * Add packageMode inputs to main * fix fs mocks and run yarn build * fix documentation and add error message for missing jq * add clarification on package mode caveats * fix line endings problem (?) * Revert "fix line endings problem (?)" This reverts commit 1cba302bc47081c4958c01bcf13092517679b7af. * Revert "add clarification on package mode caveats" This reverts commit fb62d36ba1cfebaabfa9eced695a203c68a0662c. * Revert "fix documentation and add error message for missing jq" This reverts commit 0df3ab6b88fe7f787c692d1b3f3f857636e166be. * Redo the input docs fixes * Redo the jq presence test * update readme to indicate package mode caveats * fix wording on coverageOptions * one more wording fix on coverageOptions * move sample package to example.com domain --------- Co-authored-by: Aaron Trudeau <120415438+trudeaua-vividream-software@users.noreply.github.com>
2023-07-03 15:09:20 +00:00
description: 'Path to the Unity project or package to be tested.'
2022-01-01 20:38:47 +00:00
customParameters:
required: false
description: 'Extra parameters to configure the Unity editor run.'
testMode:
required: false
default: 'all'
description: 'The type of tests to be run by the test runner.'
coverageOptions:
required: false
default: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;dontClear'
Add Feature to test Unity Packages (#164) * (should fail) add jq install to docker image * (might fail) remove rm rf call * move things around to try to fix test * Revert "(might fail) remove rm rf call" This reverts commit 22f74ebca711c6c66d7b9d217954a19edc7db5fb. * remove silent setting from docker test * Fix failing test's Docker image * Add new input and basic test * Add test package; start using jq cli * Use test package in test workflow * Create temporary Unity Project and run tests * Test removing jq install from Dockerfile * Revert "Test removing jq install from Dockerfile" This reverts commit 6aa7a6f44365495960f1e470e9fcf90f369683f0. * Remove mkdir call * remove duplicate command * add packageMode option back in * build changes * check for apt-get before installing jq * change apt-get version check message * spelling and documentation fixes * add working example unity package with tests * add temp pwd call to help figure out absolute pathing * fix workflow package location * add jq to add package to temp project packages * try fixing jq calls * clean up jq calls, fix variable expansion * try renaming jq args * try using different arg syntax for jq * try wrapping args in parentheses * try using double quotes only * try changing up quoting * try properly using string interpolation * try removing colon * add string interpolation to key * omit double quotes from jq call to retrieve package name * clean up logging * add rest of workflow tests * Revert "add rest of workflow tests" This reverts commit c0bb008b2c9740559dec0fb7374428d45ff46df8. * add play mode test without cache * add package mode all mode workflow step * add consecutive ppackage mode workflow step * add package mode "like in the readme" test * fix workflow syntax error * try to fix syntax error again * use correct folder * *hopefully actually* use correct package path * try adding caching to "readme" test * remove caching/mentions of caching from package mode tests * fix artifacts paths * fix artifacts pathing and names * fix combined artifacts for package mode * clean up documentation and exit code * clarify allowed docker images for packageMode * update README to mention Unity packages * move package name validation to TS part of action * improve logging for temp project creation failure * make husky hook executable * add error for missing tests folder * update docs to reflect unsupported packages * remove jq install * Revert "remove jq install" This reverts commit bd35ac8f6f48c7c01456e70855d4109dba8cffdf. * TEMP log image in use * Revert "TEMP log image in use" This reverts commit 95722dcab432168201bf69e20ad7bf8b8a48d3fa. * Revert "Revert "remove jq install"" This reverts commit e3bac048b1dfb51270b469c0a5e649e9c7a8acce. * TEMP list installed packages * Revert "TEMP list installed packages" This reverts commit db9c07da38fd4cdf1f738696766fda1706e8e8e9. * TEMP log project's manifest * add code coverage package to generated project * remove temp project manifest log * add coverage to package mode tests * update name of package coverage steps * add codecoverage dependency to test package * Revert "add codecoverage dependency to test package" This reverts commit 4b2c03069d3aacf4b3fc683b70dcd5019778a5c7. * add assembly filters for coverage * TEMP console log project folder * Revert "TEMP console log project folder" This reverts commit 411ec51817f805f1177681a619e51384ff66e808. * add logic to copy package to folder without activation file * fix false positive activation file detection * fix improper bash "if" formatting * TEMP remove conditional for package copying * Revert "TEMP remove conditional for package copying" This reverts commit 4f12d83889dbbfe24d1c13ba2e1d95e3aaff9693. * Revert "fix improper bash "if" formatting" This reverts commit acb975bcea47fc55f2cb6192b0adfc8640379143. * Revert "fix false positive activation file detection" This reverts commit 580c9c14a019bc4a16ca265af7be75cb04102b8f. * Revert "add logic to copy package to folder without activation file" This reverts commit b20d994b5d0c745b58c3a22c92fb757211591f6f. * run yarn build * move package mode check lower in the file * throw error if unity version is auto in package mode * fix unity version error wording * try deleting activate license file * try logging hidden package files * try deleting all non-package files * fix license activation files deletion * scrap file removals and print dir permissions * log permissions for package folder * Add packageMode inputs to main * fix fs mocks and run yarn build * fix documentation and add error message for missing jq * add clarification on package mode caveats * fix line endings problem (?) * Revert "fix line endings problem (?)" This reverts commit 1cba302bc47081c4958c01bcf13092517679b7af. * Revert "add clarification on package mode caveats" This reverts commit fb62d36ba1cfebaabfa9eced695a203c68a0662c. * Revert "fix documentation and add error message for missing jq" This reverts commit 0df3ab6b88fe7f787c692d1b3f3f857636e166be. * Redo the input docs fixes * Redo the jq presence test * update readme to indicate package mode caveats * fix wording on coverageOptions * one more wording fix on coverageOptions * move sample package to example.com domain --------- Co-authored-by: Aaron Trudeau <120415438+trudeaua-vividream-software@users.noreply.github.com>
2023-07-03 15:09:20 +00:00
description: 'Optional coverage parameters for the -coverageOptions argument. To get coverage in Package Mode, pass assemblies from the package you want covered to the assemblyFilters option.'
artifactsPath:
required: false
default: 'artifacts'
2020-11-10 17:18:00 +00:00
description: 'Path where test artifacts should be stored.'
useHostNetwork:
required: false
default: false
2022-01-01 20:38:47 +00:00
description: 'Initialises Docker using the host network.'
sshAgent:
required: false
default: ''
2022-01-01 20:38:47 +00:00
description: 'SSH Agent path to forward to the container.'
sshPublicKeysDirectoryPath:
required: false
default: ''
description: 'Path to a directory containing SSH public keys to forward to the container.'
gitPrivateToken:
required: false
default: ''
2022-01-01 20:38:47 +00:00
description: 'GitHub Private Access Token (PAT) to pull from GitHub.'
githubToken:
2021-02-27 18:13:19 +00:00
required: false
default: ''
description: 'Token to authorize access to the GitHub REST API. If provided, a check run will be created with the test results.'
2021-02-27 18:13:19 +00:00
checkName:
required: false
default: 'Test Results'
description: 'Name for the check run that is created when a github token is provided.'
Add Feature to test Unity Packages (#164) * (should fail) add jq install to docker image * (might fail) remove rm rf call * move things around to try to fix test * Revert "(might fail) remove rm rf call" This reverts commit 22f74ebca711c6c66d7b9d217954a19edc7db5fb. * remove silent setting from docker test * Fix failing test's Docker image * Add new input and basic test * Add test package; start using jq cli * Use test package in test workflow * Create temporary Unity Project and run tests * Test removing jq install from Dockerfile * Revert "Test removing jq install from Dockerfile" This reverts commit 6aa7a6f44365495960f1e470e9fcf90f369683f0. * Remove mkdir call * remove duplicate command * add packageMode option back in * build changes * check for apt-get before installing jq * change apt-get version check message * spelling and documentation fixes * add working example unity package with tests * add temp pwd call to help figure out absolute pathing * fix workflow package location * add jq to add package to temp project packages * try fixing jq calls * clean up jq calls, fix variable expansion * try renaming jq args * try using different arg syntax for jq * try wrapping args in parentheses * try using double quotes only * try changing up quoting * try properly using string interpolation * try removing colon * add string interpolation to key * omit double quotes from jq call to retrieve package name * clean up logging * add rest of workflow tests * Revert "add rest of workflow tests" This reverts commit c0bb008b2c9740559dec0fb7374428d45ff46df8. * add play mode test without cache * add package mode all mode workflow step * add consecutive ppackage mode workflow step * add package mode "like in the readme" test * fix workflow syntax error * try to fix syntax error again * use correct folder * *hopefully actually* use correct package path * try adding caching to "readme" test * remove caching/mentions of caching from package mode tests * fix artifacts paths * fix artifacts pathing and names * fix combined artifacts for package mode * clean up documentation and exit code * clarify allowed docker images for packageMode * update README to mention Unity packages * move package name validation to TS part of action * improve logging for temp project creation failure * make husky hook executable * add error for missing tests folder * update docs to reflect unsupported packages * remove jq install * Revert "remove jq install" This reverts commit bd35ac8f6f48c7c01456e70855d4109dba8cffdf. * TEMP log image in use * Revert "TEMP log image in use" This reverts commit 95722dcab432168201bf69e20ad7bf8b8a48d3fa. * Revert "Revert "remove jq install"" This reverts commit e3bac048b1dfb51270b469c0a5e649e9c7a8acce. * TEMP list installed packages * Revert "TEMP list installed packages" This reverts commit db9c07da38fd4cdf1f738696766fda1706e8e8e9. * TEMP log project's manifest * add code coverage package to generated project * remove temp project manifest log * add coverage to package mode tests * update name of package coverage steps * add codecoverage dependency to test package * Revert "add codecoverage dependency to test package" This reverts commit 4b2c03069d3aacf4b3fc683b70dcd5019778a5c7. * add assembly filters for coverage * TEMP console log project folder * Revert "TEMP console log project folder" This reverts commit 411ec51817f805f1177681a619e51384ff66e808. * add logic to copy package to folder without activation file * fix false positive activation file detection * fix improper bash "if" formatting * TEMP remove conditional for package copying * Revert "TEMP remove conditional for package copying" This reverts commit 4f12d83889dbbfe24d1c13ba2e1d95e3aaff9693. * Revert "fix improper bash "if" formatting" This reverts commit acb975bcea47fc55f2cb6192b0adfc8640379143. * Revert "fix false positive activation file detection" This reverts commit 580c9c14a019bc4a16ca265af7be75cb04102b8f. * Revert "add logic to copy package to folder without activation file" This reverts commit b20d994b5d0c745b58c3a22c92fb757211591f6f. * run yarn build * move package mode check lower in the file * throw error if unity version is auto in package mode * fix unity version error wording * try deleting activate license file * try logging hidden package files * try deleting all non-package files * fix license activation files deletion * scrap file removals and print dir permissions * log permissions for package folder * Add packageMode inputs to main * fix fs mocks and run yarn build * fix documentation and add error message for missing jq * add clarification on package mode caveats * fix line endings problem (?) * Revert "fix line endings problem (?)" This reverts commit 1cba302bc47081c4958c01bcf13092517679b7af. * Revert "add clarification on package mode caveats" This reverts commit fb62d36ba1cfebaabfa9eced695a203c68a0662c. * Revert "fix documentation and add error message for missing jq" This reverts commit 0df3ab6b88fe7f787c692d1b3f3f857636e166be. * Redo the input docs fixes * Redo the jq presence test * update readme to indicate package mode caveats * fix wording on coverageOptions * one more wording fix on coverageOptions * move sample package to example.com domain --------- Co-authored-by: Aaron Trudeau <120415438+trudeaua-vividream-software@users.noreply.github.com>
2023-07-03 15:09:20 +00:00
packageMode:
required: false
default: false
description: 'Whether the tests are being run for a Unity package instead of a Unity project. If true, the action can only be run on Linux runners, and any custom docker image passed to this action must have `jq` installed. NOTE: may not work properly for packages with dependencies outside of the Unity Registry.'
chownFilesTo:
required: false
default: ''
description: 'User and optionally group (user or user:group or uid:gid) to give ownership of the resulting build artifacts'
unityLicensingServer:
required: false
default: ''
description: 'Url to a unity license server for acquiring floating licenses.'
2019-11-30 15:36:27 +00:00
outputs:
artifactsPath:
description: 'Path where the artifacts are stored.'
coveragePath:
description: 'Path where the code coverage results are stored.'
2019-11-30 15:36:27 +00:00
branding:
icon: 'box'
color: 'gray-dark'
2020-01-29 20:49:35 +00:00
runs:
using: 'node16'
feat: ensure cleanup of docker containers (#198) Cancelled or timeouted workflow would keep the docker container running. Closes game-ci/unity-test-runner#197 This has two parts: Part one. The entrypoints. `runs.post`: GitHub Action metadata allow running something after the action (regardless of a failure, crash, timeout, ...). https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runspost However, it needs to be a `.js` file and it can't be configured to pass any arguments. There already was `index.js` used as the main entrypoint. The build process of this file uses typescript compiler and ncc to pack all dependencies into one .js file. And ncc has no way of generating multiple files in one go, so the only solution would be to run ncc twice and generate two independent files. That would be quite unfortunate, wasting time and storage. So I rather came up with a new entrypoint that symlinked from two locations. And this new entrypoint understands how it was executed, so it can run the correct behaviour. This makes it easy to add `runs.pre` if needed. This new entrypoint is in `index.ts`. The original `index.ts` is now in `main.ts`. Part two. The signals. I've tried: * try/catch/finally around the `await Docker.run`. Catch and finally are not executed when process receives SIGINT. See the discussion in: https://github.com/nodejs/node/discussions/29480 * New AbortController and AbortSignal. Great concept, but the action.exec does not support it. So it can't be aborted. * Doing cleanup on `process.on('exit')`. Unfortunately you can't really do async stuff from there, so can't really run the docker rm command to delete the container. * Using `process.on('SIGINT')`. For some reason that wasn't really executing for me. I'd not put my hand in fire for this, but I assume because it was in the signal handler it does something special, or would heed to be scheduled for later with `setTimeout(0)`. Evaluating all these I came to a conclusion that it is fragile and just relying on a `runs.post` is much better and safer. `
2022-11-03 18:14:51 +00:00
main: 'dist/main.js'
post: 'dist/post.js'