Corrected bash arguments

pull/182/head
Nick Maltbie 2022-04-18 23:18:10 -04:00
parent 4cf6166634
commit 849404de92
4 changed files with 9 additions and 19 deletions

8
dist/index.js vendored
View File

@ -163,12 +163,6 @@ const Docker = {
if (!(0, fs_1.existsSync)(githubWorkflow)) if (!(0, fs_1.existsSync)(githubWorkflow))
(0, fs_1.mkdirSync)(githubWorkflow); (0, fs_1.mkdirSync)(githubWorkflow);
const testPlatforms = (testMode === 'all' ? ['playmode', 'editmode', 'COMBINE_RESULTS'] : [testMode]).join(';'); const testPlatforms = (testMode === 'all' ? ['playmode', 'editmode', 'COMBINE_RESULTS'] : [testMode]).join(';');
const coverageOptions = [
'-enableCodeCoverage',
'-debugCodeOptimization',
'-coverageOptions',
coverageParameters,
].join(' ');
const command = `docker run \ const command = `docker run \
--workdir /github/workspace \ --workdir /github/workspace \
--rm \ --rm \
@ -181,7 +175,7 @@ const Docker = {
--env PROJECT_PATH="${projectPath}" \ --env PROJECT_PATH="${projectPath}" \
--env CUSTOM_PARAMETERS="${customParameters}" \ --env CUSTOM_PARAMETERS="${customParameters}" \
--env TEST_PLATFORMS="${testPlatforms}" \ --env TEST_PLATFORMS="${testPlatforms}" \
--env COVERAGE_OPTIONS="${coverageOptions}" \ --env COVERAGE_OPTIONS="${coverageParameters}" \
--env COVERAGE_RESULTS_PATH="${coverageResultsPath}" \ --env COVERAGE_RESULTS_PATH="${coverageResultsPath}" \
--env ARTIFACTS_PATH="${artifactsPath}" \ --env ARTIFACTS_PATH="${artifactsPath}" \
--env GITHUB_REF \ --env GITHUB_REF \

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@ FULL_ARTIFACTS_PATH=$GITHUB_WORKSPACE/$ARTIFACTS_PATH
# Set and display the coverage results path # Set and display the coverage results path
# #
echo "Using artifacts path \"$COVERAGE_RESULTS_PATH\" to save test coverage results." echo "Using coverage results path \"$COVERAGE_RESULTS_PATH\" to save test coverage results."
FULL_COVERAGE_RESULTS_PATH=$GITHUB_WORKSPACE/$COVERAGE_RESULTS_PATH FULL_COVERAGE_RESULTS_PATH=$GITHUB_WORKSPACE/$COVERAGE_RESULTS_PATH
# #
@ -65,7 +65,7 @@ for platform in ${TEST_PLATFORMS//;/ }; do
echo "###########################" echo "###########################"
echo "" echo ""
if [[ "$platform" -eq "COMBINE_RESULTS" ]]; then if [[ "$platform" != "COMBINE_RESULTS" ]]; then
runTests="-runTests -testPlatform $platform -testResults $FULL_ARTIFACTS_PATH/$platform-results.xml" runTests="-runTests -testPlatform $platform -testResults $FULL_ARTIFACTS_PATH/$platform-results.xml"
else else
runTests="-quit" runTests="-quit"
@ -77,7 +77,9 @@ for platform in ${TEST_PLATFORMS//;/ }; do
-projectPath "$UNITY_PROJECT_PATH" \ -projectPath "$UNITY_PROJECT_PATH" \
-coverageResultsPath "$FULL_COVERAGE_RESULTS_PATH" \ -coverageResultsPath "$FULL_COVERAGE_RESULTS_PATH" \
$runTests \ $runTests \
"$COVERAGE_OPTIONS" \ -enableCodeCoverage \
-debugCodeOptimization \
-coverageOptions "$COVERAGE_OPTIONS" \
$CUSTOM_PARAMETERS $CUSTOM_PARAMETERS
# Catch exit code # Catch exit code
@ -107,7 +109,7 @@ for platform in ${TEST_PLATFORMS//;/ }; do
echo "###########################" echo "###########################"
echo "" echo ""
if [[ "$platform" -eq "COMBINE_RESULTS" ]]; then if [[ "$platform" != "COMBINE_RESULTS" ]]; then
cat "$FULL_ARTIFACTS_PATH/$platform-results.xml" cat "$FULL_ARTIFACTS_PATH/$platform-results.xml"
cat "$FULL_ARTIFACTS_PATH/$platform-results.xml" | grep test-run | grep Passed cat "$FULL_ARTIFACTS_PATH/$platform-results.xml" | grep test-run | grep Passed
fi fi

View File

@ -28,12 +28,6 @@ const Docker = {
const testPlatforms = ( const testPlatforms = (
testMode === 'all' ? ['playmode', 'editmode', 'COMBINE_RESULTS'] : [testMode] testMode === 'all' ? ['playmode', 'editmode', 'COMBINE_RESULTS'] : [testMode]
).join(';'); ).join(';');
const coverageOptions = [
'-enableCodeCoverage',
'-debugCodeOptimization',
'-coverageOptions',
coverageParameters,
].join(' ');
const command = `docker run \ const command = `docker run \
--workdir /github/workspace \ --workdir /github/workspace \
@ -47,7 +41,7 @@ const Docker = {
--env PROJECT_PATH="${projectPath}" \ --env PROJECT_PATH="${projectPath}" \
--env CUSTOM_PARAMETERS="${customParameters}" \ --env CUSTOM_PARAMETERS="${customParameters}" \
--env TEST_PLATFORMS="${testPlatforms}" \ --env TEST_PLATFORMS="${testPlatforms}" \
--env COVERAGE_OPTIONS="${coverageOptions}" \ --env COVERAGE_OPTIONS="${coverageParameters}" \
--env COVERAGE_RESULTS_PATH="${coverageResultsPath}" \ --env COVERAGE_RESULTS_PATH="${coverageResultsPath}" \
--env ARTIFACTS_PATH="${artifactsPath}" \ --env ARTIFACTS_PATH="${artifactsPath}" \
--env GITHUB_REF \ --env GITHUB_REF \