Compare commits
No commits in common. "main" and "v4" have entirely different histories.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -65,14 +65,7 @@ elif [[ -n "$UNITY_LICENSING_SERVER" ]]; then
|
||||||
FLOATING_LICENSE=$(sed -n 2p <<< "$PARSEDFILE")
|
FLOATING_LICENSE=$(sed -n 2p <<< "$PARSEDFILE")
|
||||||
FLOATING_LICENSE_TIMEOUT=$(sed -n 4p <<< "$PARSEDFILE")
|
FLOATING_LICENSE_TIMEOUT=$(sed -n 4p <<< "$PARSEDFILE")
|
||||||
|
|
||||||
if [[ -z "$FLOATING_LICENSE" || -z "$FLOATING_LICENSE_TIMEOUT" ]]; then
|
echo "Acquired floating license: \"$FLOATING_LICENSE\" with timeout $FLOATING_LICENSE_TIMEOUT"
|
||||||
echo "::error ::Failed to acquire floating license from Unity Licensing Server."
|
|
||||||
echo "Check the activation log below for more details."
|
|
||||||
cat license.txt
|
|
||||||
else
|
|
||||||
echo "Acquired floating license: \"$FLOATING_LICENSE\" with timeout $FLOATING_LICENSE_TIMEOUT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Store the exit code from the verify command
|
# Store the exit code from the verify command
|
||||||
else
|
else
|
||||||
#
|
#
|
||||||
|
|
|
@ -22,18 +22,9 @@ const ResultsCheck = {
|
||||||
files.map(async filepath => {
|
files.map(async filepath => {
|
||||||
if (!filepath.endsWith('.xml')) return;
|
if (!filepath.endsWith('.xml')) return;
|
||||||
core.info(`Processing file ${filepath}...`);
|
core.info(`Processing file ${filepath}...`);
|
||||||
try {
|
const fileData = await ResultsParser.parseResults(path.join(artifactsPath, filepath));
|
||||||
const content = fs.readFileSync(path.join(artifactsPath, filepath), 'utf8');
|
core.info(fileData.summary);
|
||||||
if (!content.includes('<test-run')) {
|
runs.push(fileData);
|
||||||
// noinspection ExceptionCaughtLocallyJS
|
|
||||||
throw new Error('File does not appear to be a NUnit XML file');
|
|
||||||
}
|
|
||||||
const fileData = await ResultsParser.parseResults(path.join(artifactsPath, filepath));
|
|
||||||
core.info(fileData.summary);
|
|
||||||
runs.push(fileData);
|
|
||||||
} catch (error: any) {
|
|
||||||
core.warning(`Failed to parse ${filepath}: ${error.message}`);
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -248,13 +248,5 @@ at Tests.SetupFailedTest.SetUp () [0x00000] in /github/workspace/unity-project/A
|
||||||
expect(result.path).toBe('/github/workspace/unity-project/Assets/Tests/SetupFailedTest.cs');
|
expect(result.path).toBe('/github/workspace/unity-project/Assets/Tests/SetupFailedTest.cs');
|
||||||
expect(result.line).toBe(10);
|
expect(result.line).toBe(10);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Debug.LogError annotation point', () => {
|
|
||||||
const result = ResultsParser.findAnnotationPoint(
|
|
||||||
`FMODUnity.RuntimeUtils:DebugLogError (string) (at Assets/Plugins/FMOD/src/RuntimeUtils.cs:580)`,
|
|
||||||
);
|
|
||||||
expect(result.path).toBe('Assets/Plugins/FMOD/src/RuntimeUtils.cs');
|
|
||||||
expect(result.line).toBe(580);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -127,13 +127,12 @@ const ResultsParser = {
|
||||||
},
|
},
|
||||||
|
|
||||||
findAnnotationPoint(trace) {
|
findAnnotationPoint(trace) {
|
||||||
const regex = /at(?: .* in)? ((?<path>[^:]+):(?<line>\d+))/;
|
|
||||||
// Find first entry with non-zero line number in stack trace
|
// Find first entry with non-zero line number in stack trace
|
||||||
const items = trace.match(new RegExp(regex, 'g'));
|
const items = trace.match(/at .* in ((?<path>[^:]+):(?<line>\d+))/g);
|
||||||
if (Array.isArray(items)) {
|
if (Array.isArray(items)) {
|
||||||
const result: { path: any; line: number }[] = [];
|
const result: { path: any; line: number }[] = [];
|
||||||
for (const item of items) {
|
for (const item of items) {
|
||||||
const match = item.match(regex);
|
const match = item.match(/at .* in ((?<path>[^:]+):(?<line>\d+))/);
|
||||||
const point = {
|
const point = {
|
||||||
path: match ? match.groups.path : '',
|
path: match ? match.groups.path : '',
|
||||||
line: match ? Number(match.groups.line) : 0,
|
line: match ? Number(match.groups.line) : 0,
|
||||||
|
@ -147,7 +146,7 @@ const ResultsParser = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If all entries have zero line number match fallback pattern
|
// If all entries have zero line number match fallback pattern
|
||||||
const match = trace.match(regex);
|
const match = trace.match(/at .* in ((?<path>[^:]+):(?<line>\d+))/);
|
||||||
return {
|
return {
|
||||||
path: match ? match.groups.path : '',
|
path: match ? match.groups.path : '',
|
||||||
line: match ? Number(match.groups.line) : 0,
|
line: match ? Number(match.groups.line) : 0,
|
||||||
|
|
Loading…
Reference in New Issue