mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-02-03 23:49:08 +08:00
V3 Updates (#529)
- Add missing unityLicenseServer input (Fix #480) - Use HEAD when calculating semantic version number. This is a riskier change as this has always used `github.sha` on the runner. However, when pulling in other repos and running the action, it may not be referencing the correct commit on the repo. After testing, though, nothing appears to be broken so this in theory should work fine. (Fix #417) - Setup private token rewrites on Windows images (Fix #428) - Allow setting a custom workspace path within docker container with `dockerWorkspacePath`. (Fix #433) - [Breaking Change] Remove `androidAppBundle` parameter in favor of `androidExportType`.
This commit is contained in:
@@ -143,81 +143,21 @@ describe('Input', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('androidAppBundle', () => {
|
||||
it('returns the default value', () => {
|
||||
expect(Input.androidAppBundle).toStrictEqual(false);
|
||||
});
|
||||
|
||||
it('returns true when string true is passed', () => {
|
||||
const spy = jest.spyOn(core, 'getInput').mockReturnValue('true');
|
||||
expect(Input.androidAppBundle).toStrictEqual(true);
|
||||
expect(spy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('returns false when string false is passed', () => {
|
||||
const spy = jest.spyOn(core, 'getInput').mockReturnValue('false');
|
||||
expect(Input.androidAppBundle).toStrictEqual(false);
|
||||
expect(spy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('androidExportType', () => {
|
||||
it('returns the default value', () => {
|
||||
expect(Input.androidExportType).toStrictEqual('androidPackage');
|
||||
});
|
||||
|
||||
// TODO: Remove "and androidAppBundle is not set" in v3
|
||||
test.each`
|
||||
input | expected
|
||||
${'androidPackage'} | ${'androidPackage'}
|
||||
${'androidAppBundle'} | ${'androidAppBundle'}
|
||||
${'androidStudioProject'} | ${'androidStudioProject'}
|
||||
`('returns $expected when $input is passed and androidAppBundle is not set', ({ input, expected }) => {
|
||||
`('returns $expected when $input is passed', ({ input, expected }) => {
|
||||
const spy = jest.spyOn(core, 'getInput').mockReturnValue(input);
|
||||
expect(Input.androidExportType).toStrictEqual(expected);
|
||||
expect(spy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
// TODO: Remove in v3
|
||||
test.each`
|
||||
input | expected
|
||||
${'androidPackage'} | ${'androidPackage'}
|
||||
${'androidAppBundle'} | ${'androidAppBundle'}
|
||||
${'androidStudioProject'} | ${'androidStudioProject'}
|
||||
`('returns $expected when $input is passed and overrides androidAppBundle if it is set', ({ input, expected }) => {
|
||||
const spy = jest.spyOn(Input, 'getInput');
|
||||
spy.mockImplementationOnce(() => {
|
||||
return input;
|
||||
});
|
||||
|
||||
spy.mockImplementationOnce(() => {
|
||||
return 'true';
|
||||
});
|
||||
expect(Input.androidExportType).toStrictEqual(expected);
|
||||
expect(spy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
// TODO: Remove in v3
|
||||
test.each`
|
||||
input | expected
|
||||
${'true'} | ${'androidAppBundle'}
|
||||
${'false'} | ${'androidPackage'}
|
||||
`(
|
||||
'returns $expected when androidExportType is undefined and androidAppBundle is set to $input',
|
||||
({ input, expected }) => {
|
||||
const spy = jest.spyOn(Input, 'getInput');
|
||||
spy.mockImplementationOnce(() => {
|
||||
return '';
|
||||
});
|
||||
|
||||
spy.mockImplementationOnce(() => {
|
||||
return input;
|
||||
});
|
||||
|
||||
expect(Input.androidExportType).toStrictEqual(expected);
|
||||
expect(spy).toHaveBeenCalledTimes(2);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
describe('androidSymbolType', () => {
|
||||
|
||||
Reference in New Issue
Block a user