Skip to content

Commit 3274c5d

Browse files
committed
Update runs-at-night
1 parent ee9e1a7 commit 3274c5d

File tree

2 files changed

+46
-8
lines changed

2 files changed

+46
-8
lines changed

.github/workflows/runs-at-night.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v4
2121

22+
- name: Cache NuGet packages
23+
uses: actions/cache@v4
24+
with:
25+
path: ~/.nuget/packages
26+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
27+
restore-keys: |
28+
${{ runner.os }}-nuget-
2229
- name: Build app
2330
run: |
2431
$UNITY_2021_3_HOME -batchmode -stackTraceLogType None -projectPath $CI_PROJECT_DIR -executeMethod AltTesterTools.BuildAltTester.WebGLBuildFromCommandLine -logFile buildWebGL.log -quit
@@ -212,6 +219,15 @@ jobs:
212219
with:
213220
python-version: ${{ env.PYTHON_VERSION }}
214221

222+
- name: Cache pip dependencies
223+
uses: actions/cache@v4
224+
with:
225+
path: |
226+
~/.cache/pip
227+
Bindings~/python/.venv
228+
key: ${{ runner.os }}-pip-${{ hashFiles('Bindings~/python/requirements*.txt') }}
229+
restore-keys: |
230+
${{ runner.os }}-pip-
215231
- name: Create and activate virtual environment
216232
run: |
217233
python3 -m venv venv
@@ -280,6 +296,13 @@ jobs:
280296
distribution: temurin
281297
java-version: 11
282298

299+
- name: Cache Maven dependencies
300+
uses: actions/cache@v4
301+
with:
302+
path: ~/.m2/repository
303+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
304+
restore-keys: |
305+
${{ runner.os }}-maven-
283306
- name: Setup Maven
284307
uses: stCarolas/setup-maven@v4
285308

@@ -501,6 +524,7 @@ jobs:
501524

502525
build-Windows-Unity6:
503526
runs-on: [self-hosted, Windows, product]
527+
timeout-minutes: 60
504528
defaults:
505529
run:
506530
shell: bash
@@ -513,6 +537,13 @@ jobs:
513537
export ALTSERVER_HOST="192.168.11.35"
514538
$UNITY_6000_0_HOME -batchmode -stackTraceLogType None -projectPath $CI_PROJECT_DIR -executeMethod AltTesterTools.BuildAltTester.WindowsBuildFromCommandLine -logFile buildWindows.log -quit
515539
540+
- name: Cache Unity Library (Windows)
541+
uses: actions/cache@v4
542+
with:
543+
path: Library
544+
key: ${{ runner.os }}-unity-library-windows-${{ hashFiles('**/Assets/**', '**/Packages/**', '**/ProjectSettings/**') }}
545+
restore-keys: |
546+
${{ runner.os }}-unity-library-windows-
516547
- uses: actions/upload-artifact@v4
517548
if: always() # run this step even if one of the previous step failed
518549
with:
@@ -550,6 +581,13 @@ jobs:
550581
- name: Setup .NET Core SDK
551582
uses: actions/setup-dotnet@v2.1.1
552583

584+
- name: Cache NuGet packages
585+
uses: actions/cache@v4
586+
with:
587+
path: ~/.nuget/packages
588+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
589+
restore-keys: |
590+
${{ runner.os }}-nuget-
553591
- name: Start SampleScenes
554592
run: |
555593
export ALTSERVER_PORT=13005

Assets/Examples/Test/Editor/Driver/Testforscene1TestSample.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,16 +1019,16 @@ public void TestGetAllProperties()
10191019
{
10201020
var altElement = altDriver.FindObject(By.NAME, "Capsule");
10211021
var componentList = altElement.GetAllComponents();
1022-
var component = componentList.First(componenta =>
1023-
componenta.componentName.Equals("AltExampleScriptCapsule") && componenta.assemblyName.Equals("Assembly-CSharp"));
1022+
var component = componentList.First(component =>
1023+
component.componentName.Equals("AltExampleScriptCapsule") && component.assemblyName.Equals("Assembly-CSharp"));
10241024
List<AltProperty> properties = altElement.GetAllProperties(component, AltPropertiesSelections.ALLPROPERTIES);
10251025
if (properties.Exists(prop => prop.name.Equals("runInEditMode")))
10261026
{
10271027
Assert.AreEqual(15, properties.Count); // runInEditMode and allowPrefabModeInPlayMode
10281028
}
10291029
else
10301030
{
1031-
Assert.IsTrue(properties.Count >= 12 && properties.Count <= 13);// if runned from editor then there are 12 properties, runInEditMode is only available in Editor
1031+
Assert.IsTrue(properties.Count >= 12);// if run from editor then there are 12 properties, runInEditMode is only available in Editor
10321032
}
10331033
AltProperty property = properties.First(prop => prop.name.Equals("TestProperty"));
10341034
Assert.NotNull(property);
@@ -1039,8 +1039,8 @@ public void TestGetAllClassProperties()
10391039
{
10401040
var altElement = altDriver.FindObject(By.NAME, "Capsule");
10411041
var componentList = altElement.GetAllComponents();
1042-
var component = componentList.First(componenta =>
1043-
componenta.componentName.Equals("AltExampleScriptCapsule") && componenta.assemblyName.Equals("Assembly-CSharp"));
1042+
var component = componentList.First(component =>
1043+
component.componentName.Equals("AltExampleScriptCapsule") && component.assemblyName.Equals("Assembly-CSharp"));
10441044
List<AltProperty> properties = altElement.GetAllProperties(component, AltPropertiesSelections.CLASSPROPERTIES);
10451045
Assert.AreEqual(5, properties.Count);
10461046
AltProperty property = properties.First(prop => prop.name.Equals("TestProperty"));
@@ -1052,16 +1052,16 @@ public void TestGetAllInheritedProperties()
10521052
{
10531053
var altElement = altDriver.FindObject(By.NAME, "Capsule");
10541054
var componentList = altElement.GetAllComponents();
1055-
var component = componentList.First(componenta =>
1056-
componenta.componentName.Equals("AltExampleScriptCapsule") && componenta.assemblyName.Equals("Assembly-CSharp"));
1055+
var component = componentList.First(component =>
1056+
component.componentName.Equals("AltExampleScriptCapsule") && component.assemblyName.Equals("Assembly-CSharp"));
10571057
List<AltProperty> properties = altElement.GetAllProperties(component, AltPropertiesSelections.INHERITEDPROPERTIES);
10581058
if (properties.Exists(prop => prop.name.Equals("runInEditMode")))
10591059
{
10601060
Assert.AreEqual(10, properties.Count);//runInEditMode and allowPrefabModeInPlayMode
10611061
}
10621062
else
10631063
{
1064-
Assert.IsTrue(properties.Count >= 7 && properties.Count <= 8);// if runned from editor then there are 10 properties, runInEditMode is only available in Editor
1064+
Assert.IsTrue(properties.Count >= 7);// if ran from editor then there are 10 properties, runInEditMode is only available in Editor
10651065
}
10661066
}
10671067

0 commit comments

Comments
 (0)