mirror of
https://github.com/game-ci/unity-test-runner.git
synced 2026-02-04 02:43:19 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ff419b913 | ||
|
|
e0e796f3d9 | ||
|
|
eba7e93e66 |
@@ -45,7 +45,7 @@ GameCI is free for everyone forever.
|
|||||||
|
|
||||||
You can support us at [OpenCollective](https://opencollective.com/game-ci).
|
You can support us at [OpenCollective](https://opencollective.com/game-ci).
|
||||||
|
|
||||||
## Licence
|
## License
|
||||||
|
|
||||||
This repository is [MIT](./LICENSE) licensed.
|
This repository is [MIT](./LICENSE) licensed.
|
||||||
|
|
||||||
|
|||||||
8
dist/index.js
generated
vendored
8
dist/index.js
generated
vendored
@@ -1063,10 +1063,12 @@ const ResultsCheck = {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const pullRequest = github.context.payload.pull_request;
|
const pullRequest = github.context.payload.pull_request;
|
||||||
const headSha = (pullRequest && pullRequest.head.sha) || github.context.sha;
|
const headSha = (pullRequest && pullRequest.head.sha) || github.context.sha;
|
||||||
|
// Check max length for https://github.com/game-ci/unity-test-runner/issues/214
|
||||||
const maxLength = 65534;
|
const maxLength = 65534;
|
||||||
if (output.length > maxLength) {
|
if (output.text.length > maxLength) {
|
||||||
core.warning(`Output too long (${output.length}) truncating to ${maxLength}`);
|
core.warning(`Test details of ${output.text.length} surpass limit of ${maxLength}`);
|
||||||
output = output.slice(0, maxLength);
|
output.text =
|
||||||
|
'Test details omitted from GitHub UI due to length. See console logs for details.';
|
||||||
}
|
}
|
||||||
core.info(`Posting results for ${headSha}`);
|
core.info(`Posting results for ${headSha}`);
|
||||||
const createCheckRequest = Object.assign(Object.assign({}, github.context.repo), { name: checkName, head_sha: headSha, status: 'completed', conclusion: 'neutral', output });
|
const createCheckRequest = Object.assign(Object.assign({}, github.context.repo), { name: checkName, head_sha: headSha, status: 'completed', conclusion: 'neutral', output });
|
||||||
|
|||||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
33
dist/platforms/ubuntu/run_tests.sh
vendored
33
dist/platforms/ubuntu/run_tests.sh
vendored
@@ -36,6 +36,25 @@ echo "Using custom parameters $CUSTOM_PARAMETERS."
|
|||||||
|
|
||||||
echo "Using Unity version \"$UNITY_VERSION\" to test."
|
echo "Using Unity version \"$UNITY_VERSION\" to test."
|
||||||
|
|
||||||
|
#
|
||||||
|
# Setup token for private package registry.
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ -n "$PRIVATE_REGISTRY_TOKEN" ]; then
|
||||||
|
echo "Private registry token detected, creating .upmconfig.toml"
|
||||||
|
|
||||||
|
UPM_CONFIG_TOML_PATH="$HOME/.upmconfig.toml"
|
||||||
|
echo "Creating toml at path: $UPM_CONFIG_TOML_PATH"
|
||||||
|
|
||||||
|
touch $UPM_CONFIG_TOML_PATH
|
||||||
|
|
||||||
|
cat > "$UPM_CONFIG_TOML_PATH" <<EOF
|
||||||
|
[npmAuth."$SCOPED_REGISTRY_URL"]
|
||||||
|
token = "$PRIVATE_REGISTRY_TOKEN"
|
||||||
|
alwaysAuth = true
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create an empty project for testing if in package mode
|
# Create an empty project for testing if in package mode
|
||||||
#
|
#
|
||||||
@@ -120,20 +139,6 @@ if [ "$PACKAGE_MODE" = "true" ]; then
|
|||||||
|
|
||||||
UNITY_PROJECT_PATH="$TEMP_PROJECT_PATH"
|
UNITY_PROJECT_PATH="$TEMP_PROJECT_PATH"
|
||||||
|
|
||||||
if [ -n "$PRIVATE_REGISTRY_TOKEN" ]; then
|
|
||||||
echo "Private registry token detected, creating .upmconfig.toml"
|
|
||||||
|
|
||||||
UPM_CONFIG_TOML_PATH="$HOME/.upmconfig.toml"
|
|
||||||
echo "Creating toml at path: $UPM_CONFIG_TOML_PATH"
|
|
||||||
|
|
||||||
touch $UPM_CONFIG_TOML_PATH
|
|
||||||
|
|
||||||
cat > "$UPM_CONFIG_TOML_PATH" <<EOF
|
|
||||||
[npmAuth."$SCOPED_REGISTRY_URL"]
|
|
||||||
token = "$PRIVATE_REGISTRY_TOKEN"
|
|
||||||
alwaysAuth = true
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -76,10 +76,12 @@ const ResultsCheck = {
|
|||||||
const pullRequest = github.context.payload.pull_request;
|
const pullRequest = github.context.payload.pull_request;
|
||||||
const headSha = (pullRequest && pullRequest.head.sha) || github.context.sha;
|
const headSha = (pullRequest && pullRequest.head.sha) || github.context.sha;
|
||||||
|
|
||||||
|
// Check max length for https://github.com/game-ci/unity-test-runner/issues/214
|
||||||
const maxLength = 65_534;
|
const maxLength = 65_534;
|
||||||
if (output.length > maxLength) {
|
if (output.text.length > maxLength) {
|
||||||
core.warning(`Output too long (${output.length}) truncating to ${maxLength}`);
|
core.warning(`Test details of ${output.text.length} surpass limit of ${maxLength}`);
|
||||||
output = output.slice(0, maxLength);
|
output.text =
|
||||||
|
'Test details omitted from GitHub UI due to length. See console logs for details.';
|
||||||
}
|
}
|
||||||
|
|
||||||
core.info(`Posting results for ${headSha}`);
|
core.info(`Posting results for ${headSha}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user