mirror of
https://github.com/game-ci/unity-test-runner.git
synced 2026-01-29 22:49:12 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c80d9094f5 | ||
|
|
8bb2cdbd2c | ||
|
|
7b6d529621 | ||
|
|
cf54cef2d1 | ||
|
|
ca5119b29e | ||
|
|
275df9854c | ||
|
|
9d0bc623a7 | ||
|
|
6ed138a47c |
62
.github/workflows/main.yml
vendored
62
.github/workflows/main.yml
vendored
@@ -13,8 +13,8 @@ jobs:
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18.x
|
||||
- run: yarn
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
projectPath:
|
||||
- unity-project-with-correct-tests
|
||||
unityVersion:
|
||||
- 2019.4.40f1
|
||||
- 2022.3.7f1
|
||||
testMode:
|
||||
- playmode
|
||||
- editmode
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
# Checkout #
|
||||
###########################
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
@@ -78,12 +78,12 @@ jobs:
|
||||
projectPath:
|
||||
- unity-project-with-correct-tests
|
||||
unityVersion:
|
||||
- 2019.4.40f1
|
||||
- 2022.3.7f1
|
||||
steps:
|
||||
###########################
|
||||
# Checkout #
|
||||
###########################
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
@@ -132,14 +132,14 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
unityVersion:
|
||||
- 2019.4.40f1
|
||||
- 2022.3.7f1
|
||||
projectPath:
|
||||
- unity-project-with-correct-tests
|
||||
steps:
|
||||
###########################
|
||||
# Checkout #
|
||||
###########################
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
@@ -189,12 +189,12 @@ jobs:
|
||||
projectPath:
|
||||
- unity-project-with-correct-tests
|
||||
unityVersion:
|
||||
- 2019.4.40f1
|
||||
- 2022.3.7f1
|
||||
steps:
|
||||
###########################
|
||||
# Checkout #
|
||||
###########################
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
@@ -244,12 +244,12 @@ jobs:
|
||||
projectPath:
|
||||
- unity-project-with-correct-tests
|
||||
unityVersion:
|
||||
- 2019.4.40f1
|
||||
- 2022.3.7f1
|
||||
steps:
|
||||
###########################
|
||||
# Checkout #
|
||||
###########################
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
@@ -291,12 +291,12 @@ jobs:
|
||||
projectPath:
|
||||
- unity-project-with-correct-tests
|
||||
unityVersion:
|
||||
- 2019.4.40f1 # Only 2019.4+ docker images contain the IL2CPP backend installed.
|
||||
- 2022.3.7f1 # Only 2019.4+ docker images contain the IL2CPP backend installed.
|
||||
steps:
|
||||
###########################
|
||||
# Checkout #
|
||||
###########################
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
@@ -343,14 +343,14 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
unityVersion:
|
||||
- 2019.4.40f1
|
||||
- 2022.3.7f1
|
||||
projectPath:
|
||||
- unity-project-with-correct-tests
|
||||
steps:
|
||||
###########################
|
||||
# Checkout #
|
||||
###########################
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
@@ -409,7 +409,7 @@ jobs:
|
||||
projectPath:
|
||||
- unity-package-with-correct-tests/com.example.testpackage
|
||||
unityVersion:
|
||||
- 2019.2.11f1
|
||||
- 2022.3.7f1
|
||||
testMode:
|
||||
- playmode
|
||||
- editmode
|
||||
@@ -419,7 +419,7 @@ jobs:
|
||||
# Checkout #
|
||||
###########################
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
@@ -433,7 +433,7 @@ jobs:
|
||||
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
|
||||
packageMode: true
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Package test results for ${{ matrix.testMode }}
|
||||
path: ${{ steps.packageTests.outputs.artifactsPath }}
|
||||
@@ -448,12 +448,12 @@ jobs:
|
||||
projectPath:
|
||||
- unity-package-with-correct-tests/com.example.testpackage
|
||||
unityVersion:
|
||||
- 2019.2.11f1
|
||||
- 2022.3.7f1
|
||||
steps:
|
||||
###########################
|
||||
# Checkout #
|
||||
###########################
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
@@ -471,7 +471,7 @@ jobs:
|
||||
|
||||
# Upload artifacts
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Package test results (all)
|
||||
path: ${{ steps.packageAllTests.outputs.artifactsPath }}
|
||||
@@ -492,14 +492,14 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
unityVersion:
|
||||
- 2019.2.11f1
|
||||
- 2022.3.7f1
|
||||
projectPath:
|
||||
- unity-package-with-correct-tests/com.example.testpackage
|
||||
steps:
|
||||
###########################
|
||||
# Checkout #
|
||||
###########################
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
@@ -517,7 +517,7 @@ jobs:
|
||||
|
||||
# Upload artifacts
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Package test results (edit mode)
|
||||
path: ${{ steps.packageEditMode.outputs.artifactsPath }}
|
||||
@@ -540,12 +540,12 @@ jobs:
|
||||
projectPath:
|
||||
- unity-package-with-correct-tests/com.example.testpackage
|
||||
unityVersion:
|
||||
- 2019.2.11f1
|
||||
- 2022.3.7f1
|
||||
steps:
|
||||
###########################
|
||||
# Checkout #
|
||||
###########################
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
@@ -563,7 +563,7 @@ jobs:
|
||||
|
||||
# Upload artifacts
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Package test results (play mode)
|
||||
path: ${{ steps.packagePlayMode.outputs.artifactsPath }}
|
||||
@@ -584,14 +584,14 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
unityVersion:
|
||||
- 2019.2.11f1
|
||||
- 2022.3.7f1
|
||||
projectPath:
|
||||
- unity-package-with-correct-tests/com.example.testpackage
|
||||
steps:
|
||||
###########################
|
||||
# Checkout #
|
||||
###########################
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
@@ -617,7 +617,7 @@ jobs:
|
||||
|
||||
# Upload combined artifacts
|
||||
- name: Upload combined test results
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Package test results (combined)
|
||||
path: packageArtifacts/
|
||||
|
||||
22
action.yml
22
action.yml
@@ -36,6 +36,10 @@ inputs:
|
||||
required: false
|
||||
default: ''
|
||||
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: ''
|
||||
@@ -56,6 +60,24 @@ inputs:
|
||||
required: false
|
||||
default: ''
|
||||
description: 'User and optionally group (user or user:group or uid:gid) to give ownership of the resulting build artifacts'
|
||||
dockerCpuLimit:
|
||||
required: false
|
||||
default: ''
|
||||
description: 'Number of CPU cores to assign the docker container. Defaults to all available cores on all platforms.'
|
||||
dockerMemoryLimit:
|
||||
required: false
|
||||
default: ''
|
||||
description:
|
||||
'Amount of memory to assign the docker container. Defaults to 95% of total system memory rounded down to the
|
||||
nearest megabyte on Linux and 80% on Windows. On unrecognized platforms, defaults to 75% of total system memory.
|
||||
To manually specify a value, use the format <number><unit>, where unit is either m or g. ie: 512m = 512 megabytes'
|
||||
dockerIsolationMode:
|
||||
required: false
|
||||
default: 'default'
|
||||
description:
|
||||
'Isolation mode to use for the docker container. Can be one of process, hyperv, or default. Default will pick the
|
||||
default mode as described by Microsoft where server versions use process and desktop versions use hyperv. Only
|
||||
applicable on Windows'
|
||||
unityLicensingServer:
|
||||
required: false
|
||||
default: ''
|
||||
|
||||
1
dist/entrypoint.sh
vendored
1
dist/entrypoint.sh
vendored
@@ -12,6 +12,7 @@ mkdir -p "$ACTIVATE_LICENSE_PATH"
|
||||
#
|
||||
|
||||
source /steps/activate.sh
|
||||
source /steps/set_extra_git_configs.sh
|
||||
source /steps/set_gitcredential.sh
|
||||
source /steps/run_tests.sh
|
||||
source /steps/return_license.sh
|
||||
|
||||
61
dist/index.js
generated
vendored
61
dist/index.js
generated
vendored
@@ -98,7 +98,7 @@ function run() {
|
||||
try {
|
||||
model_1.Action.checkCompatibility();
|
||||
const { workspace, actionFolder } = model_1.Action;
|
||||
const { editorVersion, customImage, projectPath, customParameters, testMode, coverageOptions, artifactsPath, useHostNetwork, sshAgent, gitPrivateToken, githubToken, checkName, packageMode, packageName, chownFilesTo, unityLicensingServer, } = model_1.Input.getFromUser();
|
||||
const { editorVersion, customImage, projectPath, customParameters, testMode, coverageOptions, artifactsPath, useHostNetwork, sshAgent, sshPublicKeysDirectoryPath, gitPrivateToken, githubToken, checkName, packageMode, packageName, chownFilesTo, dockerCpuLimit, dockerMemoryLimit, dockerIsolationMode, unityLicensingServer, } = model_1.Input.getFromUser();
|
||||
const baseImage = new model_1.ImageTag({ editorVersion, customImage });
|
||||
const runnerContext = model_1.Action.runnerContext();
|
||||
try {
|
||||
@@ -112,11 +112,15 @@ function run() {
|
||||
artifactsPath,
|
||||
useHostNetwork,
|
||||
sshAgent,
|
||||
sshPublicKeysDirectoryPath,
|
||||
packageMode,
|
||||
packageName,
|
||||
gitPrivateToken,
|
||||
githubToken,
|
||||
chownFilesTo,
|
||||
dockerCpuLimit,
|
||||
dockerMemoryLimit,
|
||||
dockerIsolationMode,
|
||||
unityLicensingServer }, runnerContext));
|
||||
}
|
||||
finally {
|
||||
@@ -262,7 +266,7 @@ const Docker = {
|
||||
});
|
||||
},
|
||||
getLinuxCommand(image, parameters) {
|
||||
const { actionFolder, editorVersion, workspace, projectPath, customParameters, testMode, coverageOptions, artifactsPath, useHostNetwork, sshAgent, packageMode, packageName, gitPrivateToken, githubToken, runnerTemporaryPath, chownFilesTo, unityLicensingServer, } = parameters;
|
||||
const { actionFolder, editorVersion, workspace, projectPath, customParameters, testMode, coverageOptions, artifactsPath, useHostNetwork, sshAgent, sshPublicKeysDirectoryPath, packageMode, packageName, gitPrivateToken, githubToken, runnerTemporaryPath, chownFilesTo, dockerCpuLimit, dockerMemoryLimit, unityLicensingServer, } = parameters;
|
||||
const githubHome = path_1.default.join(runnerTemporaryPath, '_github_home');
|
||||
if (!(0, fs_1.existsSync)(githubHome))
|
||||
(0, fs_1.mkdirSync)(githubHome);
|
||||
@@ -307,6 +311,7 @@ const Docker = {
|
||||
--env RUNNER_WORKSPACE \
|
||||
--env GIT_PRIVATE_TOKEN="${gitPrivateToken}" \
|
||||
--env CHOWN_FILES_TO="${chownFilesTo}" \
|
||||
--env GIT_CONFIG_EXTENSIONS \
|
||||
${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \
|
||||
--volume "${githubHome}:/root:z" \
|
||||
--volume "${githubWorkflow}:/github/workflow:z" \
|
||||
@@ -315,15 +320,22 @@ const Docker = {
|
||||
--volume "${actionFolder}/steps:/steps:z" \
|
||||
--volume "${actionFolder}/entrypoint.sh:/entrypoint.sh:z" \
|
||||
--volume "${actionFolder}/unity-config:/usr/share/unity3d/config/:z" \
|
||||
--cpus=${dockerCpuLimit} \
|
||||
--memory=${dockerMemoryLimit} \
|
||||
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
|
||||
${sshAgent ? `--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro` : ''} \
|
||||
${sshAgent && !sshPublicKeysDirectoryPath
|
||||
? `--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro`
|
||||
: ''} \
|
||||
${sshPublicKeysDirectoryPath
|
||||
? `--volume ${sshPublicKeysDirectoryPath}:/root/.ssh:ro`
|
||||
: ''} \
|
||||
${useHostNetwork ? '--net=host' : ''} \
|
||||
${githubToken ? '--env USE_EXIT_CODE=false' : '--env USE_EXIT_CODE=true'} \
|
||||
${image} \
|
||||
/bin/bash -c /entrypoint.sh`;
|
||||
},
|
||||
getWindowsCommand(image, parameters) {
|
||||
const { actionFolder, editorVersion, workspace, projectPath, customParameters, testMode, coverageOptions, artifactsPath, useHostNetwork, sshAgent, packageMode, packageName, gitPrivateToken, githubToken, runnerTemporaryPath, chownFilesTo, unityLicensingServer, } = parameters;
|
||||
const { actionFolder, editorVersion, workspace, projectPath, customParameters, testMode, coverageOptions, artifactsPath, useHostNetwork, sshAgent, packageMode, packageName, gitPrivateToken, githubToken, runnerTemporaryPath, chownFilesTo, dockerCpuLimit, dockerMemoryLimit, dockerIsolationMode, unityLicensingServer, } = parameters;
|
||||
const githubHome = path_1.default.join(runnerTemporaryPath, '_github_home');
|
||||
if (!(0, fs_1.existsSync)(githubHome))
|
||||
(0, fs_1.mkdirSync)(githubHome);
|
||||
@@ -379,6 +391,9 @@ const Docker = {
|
||||
${sshAgent
|
||||
? `--volume c:/Users/Administrator/.ssh/known_hosts:c:/root/.ssh/known_hosts`
|
||||
: ''} \
|
||||
--cpus=${dockerCpuLimit} \
|
||||
--memory=${dockerMemoryLimit} \
|
||||
--isolation=${dockerIsolationMode} \
|
||||
${useHostNetwork ? '--net=host' : ''} \
|
||||
${githubToken ? '--env USE_EXIT_CODE=false' : '--env USE_EXIT_CODE=true'} \
|
||||
${image} \
|
||||
@@ -402,7 +417,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const platform_1 = __importDefault(__nccwpck_require__(9707));
|
||||
class ImageTag {
|
||||
constructor(imageProperties) {
|
||||
const { editorVersion = '2019.2.11f1', targetPlatform = ImageTag.getImagePlatformType(process.platform), customImage, } = imageProperties;
|
||||
const { editorVersion = '2022.3.7f1', targetPlatform = ImageTag.getImagePlatformType(process.platform), customImage, } = imageProperties;
|
||||
if (!ImageTag.versionPattern.test(editorVersion)) {
|
||||
throw new Error(`Invalid version "${editorVersion}".`);
|
||||
}
|
||||
@@ -415,7 +430,7 @@ class ImageTag {
|
||||
this.targetPlatform = targetPlatform;
|
||||
this.targetPlatformSuffix = ImageTag.getTargetPlatformSuffix(targetPlatform, editorVersion);
|
||||
this.imagePlatformPrefix = ImageTag.getImagePlatformPrefix(process.platform);
|
||||
this.imageRollingVersion = 1;
|
||||
this.imageRollingVersion = 3;
|
||||
}
|
||||
static get versionPattern() {
|
||||
return /^20\d{2}\.\d\.\w{3,4}|3$/;
|
||||
@@ -564,6 +579,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const unity_version_parser_1 = __importDefault(__nccwpck_require__(7049));
|
||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||
const core_1 = __nccwpck_require__(2186);
|
||||
const os_1 = __importDefault(__nccwpck_require__(2037));
|
||||
const Input = {
|
||||
get testModes() {
|
||||
return ['all', 'playmode', 'editmode', 'standalone'];
|
||||
@@ -572,6 +588,10 @@ const Input = {
|
||||
const validFolderName = new RegExp(/^(\.|\.\/)?(\.?[\w~]+([ _-]?[\w~]+)*\/?)*$/);
|
||||
return validFolderName.test(folderName);
|
||||
},
|
||||
isValidGlobalFolderName(folderName) {
|
||||
const validFolderName = new RegExp(/^(\.|\.\/|\/)?(\.?[\w~]+([ _-]?[\w~]+)*\/?)*$/);
|
||||
return validFolderName.test(folderName);
|
||||
},
|
||||
/**
|
||||
* When in package mode, we need to scrape the package's name from its package.json file
|
||||
*/
|
||||
@@ -619,12 +639,30 @@ const Input = {
|
||||
const rawArtifactsPath = (0, core_1.getInput)('artifactsPath') || 'artifacts';
|
||||
const rawUseHostNetwork = (0, core_1.getInput)('useHostNetwork') || 'false';
|
||||
const sshAgent = (0, core_1.getInput)('sshAgent') || '';
|
||||
const rawSshPublicKeysDirectoryPath = (0, core_1.getInput)('sshPublicKeysDirectoryPath') || '';
|
||||
const gitPrivateToken = (0, core_1.getInput)('gitPrivateToken') || '';
|
||||
const githubToken = (0, core_1.getInput)('githubToken') || '';
|
||||
const checkName = (0, core_1.getInput)('checkName') || 'Test Results';
|
||||
const rawPackageMode = (0, core_1.getInput)('packageMode') || 'false';
|
||||
let packageName = '';
|
||||
const chownFilesTo = (0, core_1.getInput)('chownFilesTo') || '';
|
||||
const dockerCpuLimit = (0, core_1.getInput)('dockerCpuLimit') || os_1.default.cpus().length.toString();
|
||||
const bytesInMegabyte = 1024 * 1024;
|
||||
let memoryMultiplier;
|
||||
switch (os_1.default.platform()) {
|
||||
case 'linux':
|
||||
memoryMultiplier = 0.95;
|
||||
break;
|
||||
case 'win32':
|
||||
memoryMultiplier = 0.8;
|
||||
break;
|
||||
default:
|
||||
memoryMultiplier = 0.75;
|
||||
break;
|
||||
}
|
||||
const dockerMemoryLimit = (0, core_1.getInput)('dockerMemoryLimit') ||
|
||||
`${Math.floor((os_1.default.totalmem() / bytesInMegabyte) * memoryMultiplier)}m`;
|
||||
const dockerIsolationMode = (0, core_1.getInput)('dockerIsolationMode') || 'default';
|
||||
// Validate input
|
||||
if (!this.testModes.includes(testMode)) {
|
||||
throw new Error(`Invalid testMode ${testMode}`);
|
||||
@@ -635,12 +673,18 @@ const Input = {
|
||||
if (!this.isValidFolderName(rawArtifactsPath)) {
|
||||
throw new Error(`Invalid artifactsPath "${rawArtifactsPath}"`);
|
||||
}
|
||||
if (!this.isValidGlobalFolderName(rawSshPublicKeysDirectoryPath)) {
|
||||
throw new Error(`Invalid sshPublicKeysDirectoryPath "${rawSshPublicKeysDirectoryPath}"`);
|
||||
}
|
||||
if (rawUseHostNetwork !== 'true' && rawUseHostNetwork !== 'false') {
|
||||
throw new Error(`Invalid useHostNetwork "${rawUseHostNetwork}"`);
|
||||
}
|
||||
if (rawPackageMode !== 'true' && rawPackageMode !== 'false') {
|
||||
throw new Error(`Invalid packageMode "${rawPackageMode}"`);
|
||||
}
|
||||
if (rawSshPublicKeysDirectoryPath !== '' && sshAgent === '') {
|
||||
throw new Error('sshPublicKeysDirectoryPath is set, but sshAgent is not set. sshPublicKeysDirectoryPath is useful only when using sshAgent.');
|
||||
}
|
||||
// sanitize packageMode input and projectPath input since they are needed
|
||||
// for input validation
|
||||
const packageMode = rawPackageMode === 'true';
|
||||
@@ -655,6 +699,7 @@ const Input = {
|
||||
}
|
||||
// Sanitise other input
|
||||
const artifactsPath = rawArtifactsPath.replace(/\/$/, '');
|
||||
const sshPublicKeysDirectoryPath = rawSshPublicKeysDirectoryPath.replace(/\/$/, '');
|
||||
const useHostNetwork = rawUseHostNetwork === 'true';
|
||||
const editorVersion = unityVersion === 'auto' ? unity_version_parser_1.default.read(projectPath) : unityVersion;
|
||||
// Return sanitised input
|
||||
@@ -668,12 +713,16 @@ const Input = {
|
||||
artifactsPath,
|
||||
useHostNetwork,
|
||||
sshAgent,
|
||||
sshPublicKeysDirectoryPath,
|
||||
gitPrivateToken,
|
||||
githubToken,
|
||||
checkName,
|
||||
packageMode,
|
||||
packageName,
|
||||
chownFilesTo,
|
||||
dockerCpuLimit,
|
||||
dockerMemoryLimit,
|
||||
dockerIsolationMode,
|
||||
unityLicensingServer,
|
||||
};
|
||||
},
|
||||
|
||||
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
2
dist/steps/run_tests.ps1
vendored
2
dist/steps/run_tests.ps1
vendored
@@ -51,7 +51,7 @@ Write-Output "###########################"
|
||||
Write-Output "# Project directory #"
|
||||
Write-Output "###########################"
|
||||
Write-Output ""
|
||||
Get-ChildItem -Hidden -Path $UNITY_PROJECT_PATH
|
||||
Get-ChildItem -Hidden -Path "$UNITY_PROJECT_PATH"
|
||||
|
||||
#
|
||||
# Testing for each platform
|
||||
|
||||
2
dist/steps/run_tests.sh
vendored
2
dist/steps/run_tests.sh
vendored
@@ -123,7 +123,7 @@ echo "###########################"
|
||||
echo "# Project directory #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
ls -alh $UNITY_PROJECT_PATH
|
||||
ls -alh "$UNITY_PROJECT_PATH"
|
||||
|
||||
#
|
||||
# Testing for each platform
|
||||
|
||||
29
dist/steps/set_extra_git_configs.sh
vendored
Normal file
29
dist/steps/set_extra_git_configs.sh
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "${GIT_CONFIG_EXTENSIONS}" ]
|
||||
then
|
||||
echo "GIT_CONFIG_EXTENSIONS unset skipping"
|
||||
else
|
||||
echo "GIT_CONFIG_EXTENSIONS is set. configuring extra git configs"
|
||||
|
||||
IFS=$'\n'
|
||||
for config in $(echo "${GIT_CONFIG_EXTENSIONS}" | sed 's/\(.*\)=\(.*\)/"\1" "\2"/g'); do
|
||||
if [[ $config =~ \"([^\"]+)\"\ \"([^\"]+)\" ]]; then
|
||||
key="${BASH_REMATCH[1]}"
|
||||
value="${BASH_REMATCH[2]}"
|
||||
else
|
||||
echo "Error parsing config: $config"
|
||||
exit 1
|
||||
fi
|
||||
echo "Adding extra git config: \"$key\" = \"$value\""
|
||||
git config --global --add "$key" "$value"
|
||||
done
|
||||
unset IFS
|
||||
|
||||
fi
|
||||
|
||||
echo "---------- git config --list -------------"
|
||||
git config --list
|
||||
|
||||
echo "---------- git config --list --show-origin -------------"
|
||||
git config --list --show-origin
|
||||
@@ -8,4 +8,6 @@ module.exports = {
|
||||
'^.+\\.ts$': 'ts-jest',
|
||||
},
|
||||
verbose: true,
|
||||
modulePathIgnorePatterns: ['<rootDir>/lib/', '<rootDir>/dist/'],
|
||||
setupFilesAfterEnv: ['<rootDir>/src/jest.setup.ts'],
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "unity-test-runner",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0",
|
||||
"description": "Run tests for any Unity project.",
|
||||
"main": "dist/index.js",
|
||||
"repository": "git@github.com:game-ci/unity-test-runner.git",
|
||||
@@ -24,7 +24,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^26.0.15",
|
||||
"@types/node": "^14.14.9",
|
||||
"@types/node": "^20.8.10",
|
||||
"@types/semver": "^7.3.5",
|
||||
"@typescript-eslint/parser": "^5.9.0",
|
||||
"@vercel/ncc": "^0.33.1",
|
||||
@@ -37,11 +37,14 @@
|
||||
"husky": "^7.0.4",
|
||||
"jest": "^26.6.3",
|
||||
"jest-circus": "^26.6.3",
|
||||
"jest-fail-on-console": "^3.0.2",
|
||||
"js-yaml": "^3.14.0",
|
||||
"lint-staged": "^12.1.2",
|
||||
"prettier": "^2.2.1",
|
||||
"ts-jest": "^26.4.4",
|
||||
"typescript": "^4.1.5"
|
||||
"ts-node": "10.4.0",
|
||||
"typescript": "^4.1.5",
|
||||
"yarn-audit-fix": "^9.3.8"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,jsx,ts,tsx}": [
|
||||
|
||||
9
src/jest.setup.ts
Normal file
9
src/jest.setup.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import failOnConsole from 'jest-fail-on-console';
|
||||
|
||||
// Fail when console logs something inside a test - use spyOn instead
|
||||
failOnConsole({
|
||||
shouldFailOnWarn: true,
|
||||
shouldFailOnError: true,
|
||||
shouldFailOnLog: true,
|
||||
shouldFailOnAssert: true,
|
||||
});
|
||||
@@ -16,12 +16,16 @@ export async function run() {
|
||||
artifactsPath,
|
||||
useHostNetwork,
|
||||
sshAgent,
|
||||
sshPublicKeysDirectoryPath,
|
||||
gitPrivateToken,
|
||||
githubToken,
|
||||
checkName,
|
||||
packageMode,
|
||||
packageName,
|
||||
chownFilesTo,
|
||||
dockerCpuLimit,
|
||||
dockerMemoryLimit,
|
||||
dockerIsolationMode,
|
||||
unityLicensingServer,
|
||||
} = Input.getFromUser();
|
||||
const baseImage = new ImageTag({ editorVersion, customImage });
|
||||
@@ -39,11 +43,15 @@ export async function run() {
|
||||
artifactsPath,
|
||||
useHostNetwork,
|
||||
sshAgent,
|
||||
sshPublicKeysDirectoryPath,
|
||||
packageMode,
|
||||
packageName,
|
||||
gitPrivateToken,
|
||||
githubToken,
|
||||
chownFilesTo,
|
||||
dockerCpuLimit,
|
||||
dockerMemoryLimit,
|
||||
dockerIsolationMode,
|
||||
unityLicensingServer,
|
||||
...runnerContext,
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import Docker from './docker';
|
||||
|
||||
describe('Docker', () => {
|
||||
it.skip('runs', async () => {
|
||||
const image = 'unity-builder:2019.2.11f1-webgl';
|
||||
const image = 'unity-builder:2022.3.7f1-webgl';
|
||||
const parameters = {
|
||||
workspace: Action.rootFolder,
|
||||
projectPath: `${Action.rootFolder}/test-project`,
|
||||
|
||||
@@ -62,12 +62,15 @@ const Docker = {
|
||||
artifactsPath,
|
||||
useHostNetwork,
|
||||
sshAgent,
|
||||
sshPublicKeysDirectoryPath,
|
||||
packageMode,
|
||||
packageName,
|
||||
gitPrivateToken,
|
||||
githubToken,
|
||||
runnerTemporaryPath,
|
||||
chownFilesTo,
|
||||
dockerCpuLimit,
|
||||
dockerMemoryLimit,
|
||||
unityLicensingServer,
|
||||
} = parameters;
|
||||
|
||||
@@ -116,6 +119,7 @@ const Docker = {
|
||||
--env RUNNER_WORKSPACE \
|
||||
--env GIT_PRIVATE_TOKEN="${gitPrivateToken}" \
|
||||
--env CHOWN_FILES_TO="${chownFilesTo}" \
|
||||
--env GIT_CONFIG_EXTENSIONS \
|
||||
${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \
|
||||
--volume "${githubHome}:/root:z" \
|
||||
--volume "${githubWorkflow}:/github/workflow:z" \
|
||||
@@ -124,9 +128,18 @@ const Docker = {
|
||||
--volume "${actionFolder}/steps:/steps:z" \
|
||||
--volume "${actionFolder}/entrypoint.sh:/entrypoint.sh:z" \
|
||||
--volume "${actionFolder}/unity-config:/usr/share/unity3d/config/:z" \
|
||||
--cpus=${dockerCpuLimit} \
|
||||
--memory=${dockerMemoryLimit} \
|
||||
${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \
|
||||
${
|
||||
sshAgent ? `--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro` : ''
|
||||
sshAgent && !sshPublicKeysDirectoryPath
|
||||
? `--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro`
|
||||
: ''
|
||||
} \
|
||||
${
|
||||
sshPublicKeysDirectoryPath
|
||||
? `--volume ${sshPublicKeysDirectoryPath}:/root/.ssh:ro`
|
||||
: ''
|
||||
} \
|
||||
${useHostNetwork ? '--net=host' : ''} \
|
||||
${githubToken ? '--env USE_EXIT_CODE=false' : '--env USE_EXIT_CODE=true'} \
|
||||
@@ -152,6 +165,9 @@ const Docker = {
|
||||
githubToken,
|
||||
runnerTemporaryPath,
|
||||
chownFilesTo,
|
||||
dockerCpuLimit,
|
||||
dockerMemoryLimit,
|
||||
dockerIsolationMode,
|
||||
unityLicensingServer,
|
||||
} = parameters;
|
||||
|
||||
@@ -213,6 +229,9 @@ const Docker = {
|
||||
? `--volume c:/Users/Administrator/.ssh/known_hosts:c:/root/.ssh/known_hosts`
|
||||
: ''
|
||||
} \
|
||||
--cpus=${dockerCpuLimit} \
|
||||
--memory=${dockerMemoryLimit} \
|
||||
--isolation=${dockerIsolationMode} \
|
||||
${useHostNetwork ? '--net=host' : ''} \
|
||||
${githubToken ? '--env USE_EXIT_CODE=false' : '--env USE_EXIT_CODE=true'} \
|
||||
${image} \
|
||||
|
||||
@@ -50,7 +50,7 @@ describe('ImageTag', () => {
|
||||
targetPlatform: some.targetPlatform,
|
||||
});
|
||||
|
||||
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2099.1.1111-1`);
|
||||
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2099.1.1111-3`);
|
||||
});
|
||||
it('returns customImage if given', () => {
|
||||
const image = new ImageTag({
|
||||
@@ -63,15 +63,15 @@ describe('ImageTag', () => {
|
||||
});
|
||||
|
||||
it('returns the specific build platform', () => {
|
||||
const image = new ImageTag({ editorVersion: '2019.2.11f1', targetPlatform: 'WebGL' });
|
||||
const image = new ImageTag({ editorVersion: '2022.3.7f1', targetPlatform: 'WebGL' });
|
||||
|
||||
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-webgl-1`);
|
||||
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2022.3.7f1-webgl-3`);
|
||||
});
|
||||
|
||||
it('returns no specific build platform for generic targetPlatforms', () => {
|
||||
const image = new ImageTag({ targetPlatform: 'NoTarget' });
|
||||
|
||||
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-1`);
|
||||
expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2022.3.7f1-3`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@ class ImageTag {
|
||||
|
||||
constructor(imageProperties) {
|
||||
const {
|
||||
editorVersion = '2019.2.11f1',
|
||||
editorVersion = '2022.3.7f1',
|
||||
targetPlatform = ImageTag.getImagePlatformType(process.platform),
|
||||
customImage,
|
||||
} = imageProperties;
|
||||
@@ -31,7 +31,7 @@ class ImageTag {
|
||||
this.targetPlatform = targetPlatform;
|
||||
this.targetPlatformSuffix = ImageTag.getTargetPlatformSuffix(targetPlatform, editorVersion);
|
||||
this.imagePlatformPrefix = ImageTag.getImagePlatformPrefix(process.platform);
|
||||
this.imageRollingVersion = 1;
|
||||
this.imageRollingVersion = 3;
|
||||
}
|
||||
|
||||
static get versionPattern() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import UnityVersionParser from './unity-version-parser';
|
||||
import fs from 'fs';
|
||||
import { getInput } from '@actions/core';
|
||||
import os from 'os';
|
||||
|
||||
const Input = {
|
||||
get testModes() {
|
||||
@@ -13,6 +14,12 @@ const Input = {
|
||||
return validFolderName.test(folderName);
|
||||
},
|
||||
|
||||
isValidGlobalFolderName(folderName) {
|
||||
const validFolderName = new RegExp(/^(\.|\.\/|\/)?(\.?[\w~]+([ _-]?[\w~]+)*\/?)*$/);
|
||||
|
||||
return validFolderName.test(folderName);
|
||||
},
|
||||
|
||||
/**
|
||||
* When in package mode, we need to scrape the package's name from its package.json file
|
||||
*/
|
||||
@@ -72,12 +79,31 @@ const Input = {
|
||||
const rawArtifactsPath = getInput('artifactsPath') || 'artifacts';
|
||||
const rawUseHostNetwork = getInput('useHostNetwork') || 'false';
|
||||
const sshAgent = getInput('sshAgent') || '';
|
||||
const rawSshPublicKeysDirectoryPath = getInput('sshPublicKeysDirectoryPath') || '';
|
||||
const gitPrivateToken = getInput('gitPrivateToken') || '';
|
||||
const githubToken = getInput('githubToken') || '';
|
||||
const checkName = getInput('checkName') || 'Test Results';
|
||||
const rawPackageMode = getInput('packageMode') || 'false';
|
||||
let packageName = '';
|
||||
const chownFilesTo = getInput('chownFilesTo') || '';
|
||||
const dockerCpuLimit = getInput('dockerCpuLimit') || os.cpus().length.toString();
|
||||
const bytesInMegabyte = 1024 * 1024;
|
||||
let memoryMultiplier;
|
||||
switch (os.platform()) {
|
||||
case 'linux':
|
||||
memoryMultiplier = 0.95;
|
||||
break;
|
||||
case 'win32':
|
||||
memoryMultiplier = 0.8;
|
||||
break;
|
||||
default:
|
||||
memoryMultiplier = 0.75;
|
||||
break;
|
||||
}
|
||||
const dockerMemoryLimit =
|
||||
getInput('dockerMemoryLimit') ||
|
||||
`${Math.floor((os.totalmem() / bytesInMegabyte) * memoryMultiplier)}m`;
|
||||
const dockerIsolationMode = getInput('dockerIsolationMode') || 'default';
|
||||
|
||||
// Validate input
|
||||
if (!this.testModes.includes(testMode)) {
|
||||
@@ -92,6 +118,10 @@ const Input = {
|
||||
throw new Error(`Invalid artifactsPath "${rawArtifactsPath}"`);
|
||||
}
|
||||
|
||||
if (!this.isValidGlobalFolderName(rawSshPublicKeysDirectoryPath)) {
|
||||
throw new Error(`Invalid sshPublicKeysDirectoryPath "${rawSshPublicKeysDirectoryPath}"`);
|
||||
}
|
||||
|
||||
if (rawUseHostNetwork !== 'true' && rawUseHostNetwork !== 'false') {
|
||||
throw new Error(`Invalid useHostNetwork "${rawUseHostNetwork}"`);
|
||||
}
|
||||
@@ -100,6 +130,12 @@ const Input = {
|
||||
throw new Error(`Invalid packageMode "${rawPackageMode}"`);
|
||||
}
|
||||
|
||||
if (rawSshPublicKeysDirectoryPath !== '' && sshAgent === '') {
|
||||
throw new Error(
|
||||
'sshPublicKeysDirectoryPath is set, but sshAgent is not set. sshPublicKeysDirectoryPath is useful only when using sshAgent.',
|
||||
);
|
||||
}
|
||||
|
||||
// sanitize packageMode input and projectPath input since they are needed
|
||||
// for input validation
|
||||
const packageMode = rawPackageMode === 'true';
|
||||
@@ -119,6 +155,7 @@ const Input = {
|
||||
|
||||
// Sanitise other input
|
||||
const artifactsPath = rawArtifactsPath.replace(/\/$/, '');
|
||||
const sshPublicKeysDirectoryPath = rawSshPublicKeysDirectoryPath.replace(/\/$/, '');
|
||||
const useHostNetwork = rawUseHostNetwork === 'true';
|
||||
const editorVersion =
|
||||
unityVersion === 'auto' ? UnityVersionParser.read(projectPath) : unityVersion;
|
||||
@@ -134,12 +171,16 @@ const Input = {
|
||||
artifactsPath,
|
||||
useHostNetwork,
|
||||
sshAgent,
|
||||
sshPublicKeysDirectoryPath,
|
||||
gitPrivateToken,
|
||||
githubToken,
|
||||
checkName,
|
||||
packageMode,
|
||||
packageName,
|
||||
chownFilesTo,
|
||||
dockerCpuLimit,
|
||||
dockerMemoryLimit,
|
||||
dockerIsolationMode,
|
||||
unityLicensingServer,
|
||||
};
|
||||
},
|
||||
|
||||
@@ -7,9 +7,9 @@ describe('UnityVersionParser', () => {
|
||||
});
|
||||
|
||||
it('parses from ProjectVersion.txt', () => {
|
||||
const projectVersionContents = `m_EditorVersion: 2019.2.11f1
|
||||
m_EditorVersionWithRevision: 2019.2.11f1 (5f859a4cfee5)`;
|
||||
expect(UnityVersionParser.parse(projectVersionContents)).toBe('2019.2.11f1');
|
||||
const projectVersionContents = `m_EditorVersion: 2022.3.7f1
|
||||
m_EditorVersionWithRevision: 2022.3.7f1 (b16b3b16c7a0)`;
|
||||
expect(UnityVersionParser.parse(projectVersionContents)).toBe('2022.3.7f1');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('UnityVersionParser', () => {
|
||||
});
|
||||
|
||||
it('reads from unity-project-with-correct-tests', () => {
|
||||
expect(UnityVersionParser.read('./unity-project-with-correct-tests')).toBe('2019.2.11f1');
|
||||
expect(UnityVersionParser.read('./unity-project-with-correct-tests')).toBe('2022.3.7f1');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
"version": "0.0.1",
|
||||
"displayName": "Test Package",
|
||||
"description": "Test Package",
|
||||
"unity": "2019.2",
|
||||
"unityRelease": "11f1",
|
||||
"unity": "2022.3",
|
||||
"unityRelease": "7f1",
|
||||
"keywords": [
|
||||
"nothing"
|
||||
],
|
||||
|
||||
34
unity-project-with-correct-tests/.gitignore
vendored
34
unity-project-with-correct-tests/.gitignore
vendored
@@ -1,12 +1,23 @@
|
||||
[Ll]ibrary/
|
||||
[Tt]emp/
|
||||
[Oo]bj/
|
||||
[Bb]uild/
|
||||
[Bb]uilds/
|
||||
[Ll]ogs/
|
||||
/[Ll]ibrary/
|
||||
/[Tt]emp/
|
||||
/[Oo]bj/
|
||||
/[Bb]uild/
|
||||
/[Bb]uilds/
|
||||
/[Ll]ogs/
|
||||
/[Uu]ser[Ss]ettings/
|
||||
|
||||
# MemoryCaptures can get excessive in size.
|
||||
# They also could contain extremely sensitive data
|
||||
/[Mm]emoryCaptures/
|
||||
|
||||
# Recordings can get excessive in size
|
||||
/[Rr]ecordings/
|
||||
|
||||
# Uncomment this line if you wish to ignore the asset store tools plugin
|
||||
# [Aa]ssets/AssetStoreTools*
|
||||
# /[Aa]ssets/AssetStoreTools*
|
||||
|
||||
# Autogenerated Jetbrains Rider plugin
|
||||
/[Aa]ssets/Plugins/Editor/JetBrains*
|
||||
|
||||
# IDEs
|
||||
.vs/
|
||||
@@ -43,7 +54,16 @@ sysinfo.txt
|
||||
|
||||
# Builds
|
||||
*.apk
|
||||
*.aab
|
||||
*.unitypackage
|
||||
*.app
|
||||
|
||||
# Crashlytics generated file
|
||||
crashlytics-build.properties
|
||||
|
||||
# Packed Addressables
|
||||
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
|
||||
|
||||
# Temporary auto-generated Android Assets
|
||||
/[Aa]ssets/[Ss]treamingAssets/aa.meta
|
||||
/[Aa]ssets/[Ss]treamingAssets/aa/*
|
||||
|
||||
54
unity-project-with-correct-tests/.vscode/settings.json
vendored
Normal file
54
unity-project-with-correct-tests/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"files.exclude": {
|
||||
"**/.DS_Store": true,
|
||||
"**/.git": true,
|
||||
"**/.gitmodules": true,
|
||||
"**/*.booproj": true,
|
||||
"**/*.pidb": true,
|
||||
"**/*.suo": true,
|
||||
"**/*.user": true,
|
||||
"**/*.userprefs": true,
|
||||
"**/*.unityproj": true,
|
||||
"**/*.dll": true,
|
||||
"**/*.exe": true,
|
||||
"**/*.pdf": true,
|
||||
"**/*.mid": true,
|
||||
"**/*.midi": true,
|
||||
"**/*.wav": true,
|
||||
"**/*.gif": true,
|
||||
"**/*.ico": true,
|
||||
"**/*.jpg": true,
|
||||
"**/*.jpeg": true,
|
||||
"**/*.png": true,
|
||||
"**/*.psd": true,
|
||||
"**/*.tga": true,
|
||||
"**/*.tif": true,
|
||||
"**/*.tiff": true,
|
||||
"**/*.3ds": true,
|
||||
"**/*.3DS": true,
|
||||
"**/*.fbx": true,
|
||||
"**/*.FBX": true,
|
||||
"**/*.lxo": true,
|
||||
"**/*.LXO": true,
|
||||
"**/*.ma": true,
|
||||
"**/*.MA": true,
|
||||
"**/*.obj": true,
|
||||
"**/*.OBJ": true,
|
||||
"**/*.asset": true,
|
||||
"**/*.cubemap": true,
|
||||
"**/*.flare": true,
|
||||
"**/*.mat": true,
|
||||
"**/*.meta": true,
|
||||
"**/*.prefab": true,
|
||||
"**/*.unity": true,
|
||||
"build/": true,
|
||||
"Build/": true,
|
||||
"Library/": true,
|
||||
"library/": true,
|
||||
"obj/": true,
|
||||
"Obj/": true,
|
||||
"ProjectSettings/": true,
|
||||
"temp/": true,
|
||||
"Temp/": true
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,15 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"com.unity.collab-proxy": "1.2.16",
|
||||
"com.unity.ext.nunit": "1.0.0",
|
||||
"com.unity.ide.rider": "1.1.0",
|
||||
"com.unity.ide.vscode": "1.1.2",
|
||||
"com.unity.package-manager-ui": "2.2.0",
|
||||
"com.unity.test-framework": "1.0.18",
|
||||
"com.unity.testtools.codecoverage": "1.1.1",
|
||||
"com.unity.textmeshpro": "2.0.1",
|
||||
"com.unity.timeline": "1.1.0",
|
||||
"com.unity.ai.navigation": "1.1.4",
|
||||
"com.unity.collab-proxy": "2.0.5",
|
||||
"com.unity.ext.nunit": "1.0.6",
|
||||
"com.unity.ide.rider": "3.0.24",
|
||||
"com.unity.ide.visualstudio": "2.0.18",
|
||||
"com.unity.ide.vscode": "1.2.5",
|
||||
"com.unity.test-framework": "1.1.33",
|
||||
"com.unity.testtools.codecoverage": "1.2.4",
|
||||
"com.unity.textmeshpro": "3.0.6",
|
||||
"com.unity.timeline": "1.7.5",
|
||||
"com.unity.ugui": "1.0.0",
|
||||
"com.unity.modules.ai": "1.0.0",
|
||||
"com.unity.modules.androidjni": "1.0.0",
|
||||
|
||||
353
unity-project-with-correct-tests/Packages/packages-lock.json
Normal file
353
unity-project-with-correct-tests/Packages/packages-lock.json
Normal file
@@ -0,0 +1,353 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"com.unity.ai.navigation": {
|
||||
"version": "1.1.4",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.modules.ai": "1.0.0"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.collab-proxy": {
|
||||
"version": "2.0.5",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ext.nunit": {
|
||||
"version": "1.0.6",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ide.rider": {
|
||||
"version": "3.0.24",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.ext.nunit": "1.0.6"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ide.visualstudio": {
|
||||
"version": "2.0.18",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.test-framework": "1.1.9"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ide.vscode": {
|
||||
"version": "1.2.5",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.settings-manager": {
|
||||
"version": "2.0.1",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.test-framework": {
|
||||
"version": "1.1.33",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.ext.nunit": "1.0.6",
|
||||
"com.unity.modules.imgui": "1.0.0",
|
||||
"com.unity.modules.jsonserialize": "1.0.0"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.testtools.codecoverage": {
|
||||
"version": "1.2.4",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.test-framework": "1.0.16",
|
||||
"com.unity.settings-manager": "1.0.1"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.textmeshpro": {
|
||||
"version": "3.0.6",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.ugui": "1.0.0"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.timeline": {
|
||||
"version": "1.7.5",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.modules.director": "1.0.0",
|
||||
"com.unity.modules.animation": "1.0.0",
|
||||
"com.unity.modules.audio": "1.0.0",
|
||||
"com.unity.modules.particlesystem": "1.0.0"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ugui": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.ui": "1.0.0",
|
||||
"com.unity.modules.imgui": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.ai": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.androidjni": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.animation": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.assetbundle": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.audio": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.cloth": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.physics": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.director": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.audio": "1.0.0",
|
||||
"com.unity.modules.animation": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.imageconversion": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.imgui": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.jsonserialize": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.particlesystem": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.physics": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.physics2d": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.screencapture": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.imageconversion": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.subsystems": {
|
||||
"version": "1.0.0",
|
||||
"depth": 1,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.jsonserialize": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.terrain": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.terrainphysics": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.physics": "1.0.0",
|
||||
"com.unity.modules.terrain": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.tilemap": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.physics2d": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.ui": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.uielements": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.ui": "1.0.0",
|
||||
"com.unity.modules.imgui": "1.0.0",
|
||||
"com.unity.modules.jsonserialize": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.umbra": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.unityanalytics": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.unitywebrequest": "1.0.0",
|
||||
"com.unity.modules.jsonserialize": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.unitywebrequest": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.unitywebrequestassetbundle": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.assetbundle": "1.0.0",
|
||||
"com.unity.modules.unitywebrequest": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.unitywebrequestaudio": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.unitywebrequest": "1.0.0",
|
||||
"com.unity.modules.audio": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.unitywebrequesttexture": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.unitywebrequest": "1.0.0",
|
||||
"com.unity.modules.imageconversion": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.unitywebrequestwww": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.unitywebrequest": "1.0.0",
|
||||
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
|
||||
"com.unity.modules.unitywebrequestaudio": "1.0.0",
|
||||
"com.unity.modules.audio": "1.0.0",
|
||||
"com.unity.modules.assetbundle": "1.0.0",
|
||||
"com.unity.modules.imageconversion": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.vehicles": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.physics": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.video": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.audio": "1.0.0",
|
||||
"com.unity.modules.ui": "1.0.0",
|
||||
"com.unity.modules.unitywebrequest": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.vr": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.jsonserialize": "1.0.0",
|
||||
"com.unity.modules.physics": "1.0.0",
|
||||
"com.unity.modules.xr": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.modules.wind": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.xr": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.modules.physics": "1.0.0",
|
||||
"com.unity.modules.jsonserialize": "1.0.0",
|
||||
"com.unity.modules.subsystems": "1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!387306366 &1
|
||||
MemorySettings:
|
||||
m_ObjectHideFlags: 0
|
||||
m_EditorMemorySettings:
|
||||
m_MainAllocatorBlockSize: -1
|
||||
m_ThreadAllocatorBlockSize: -1
|
||||
m_MainGfxBlockSize: -1
|
||||
m_ThreadGfxBlockSize: -1
|
||||
m_CacheBlockSize: -1
|
||||
m_TypetreeBlockSize: -1
|
||||
m_ProfilerBlockSize: -1
|
||||
m_ProfilerEditorBlockSize: -1
|
||||
m_BucketAllocatorGranularity: -1
|
||||
m_BucketAllocatorBucketsCount: -1
|
||||
m_BucketAllocatorBlockSize: -1
|
||||
m_BucketAllocatorBlockCount: -1
|
||||
m_ProfilerBucketAllocatorGranularity: -1
|
||||
m_ProfilerBucketAllocatorBucketsCount: -1
|
||||
m_ProfilerBucketAllocatorBlockSize: -1
|
||||
m_ProfilerBucketAllocatorBlockCount: -1
|
||||
m_TempAllocatorSizeMain: -1
|
||||
m_JobTempAllocatorBlockSize: -1
|
||||
m_BackgroundJobTempAllocatorBlockSize: -1
|
||||
m_JobTempAllocatorReducedBlockSize: -1
|
||||
m_TempAllocatorSizeGIBakingWorker: -1
|
||||
m_TempAllocatorSizeNavMeshWorker: -1
|
||||
m_TempAllocatorSizeAudioWorker: -1
|
||||
m_TempAllocatorSizeCloudWorker: -1
|
||||
m_TempAllocatorSizeGfx: -1
|
||||
m_TempAllocatorSizeJobWorker: -1
|
||||
m_TempAllocatorSizeBackgroundWorker: -1
|
||||
m_TempAllocatorSizePreloadManager: -1
|
||||
m_PlatformMemorySettings: {}
|
||||
@@ -0,0 +1,36 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &1
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 53
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EnablePreReleasePackages: 0
|
||||
m_AdvancedSettingsExpanded: 1
|
||||
m_ScopedRegistriesSettingsExpanded: 1
|
||||
m_SeeAllPackageVersions: 0
|
||||
m_DismissPreviewPackagesInUse: 0
|
||||
oneTimeWarningShown: 0
|
||||
m_Registries:
|
||||
- m_Id: main
|
||||
m_Name:
|
||||
m_Url: https://packages.unity.com
|
||||
m_Scopes: []
|
||||
m_IsDefault: 1
|
||||
m_Capabilities: 7
|
||||
m_ConfigSource: 0
|
||||
m_UserSelectedRegistryName:
|
||||
m_UserAddingNewScopedRegistry: 0
|
||||
m_RegistryInfoDraft:
|
||||
m_Modified: 0
|
||||
m_ErrorMessage:
|
||||
m_UserModificationsInstanceId: -856
|
||||
m_OriginalInstanceId: -858
|
||||
m_LoadAssets: 0
|
||||
@@ -1,2 +1,2 @@
|
||||
m_EditorVersion: 2019.2.11f1
|
||||
m_EditorVersionWithRevision: 2019.2.11f1 (5f859a4cfee5)
|
||||
m_EditorVersion: 2022.3.7f1
|
||||
m_EditorVersionWithRevision: 2022.3.7f1 (b16b3b16c7a0)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!890905787 &1
|
||||
VersionControlSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Mode: Visible Meta Files
|
||||
m_CollabEditorSettings:
|
||||
inProgressEnabled: 1
|
||||
Reference in New Issue
Block a user