Addressables are not built as part of the CI Build
When using the Addressables system the CI build should have the option to build the Addressables otherwise they will not be updated. This also affects any tests that reference addressables.
In order to fix I added the following static method to the Assets/Editor/BuildCommand.cs file.
static void BuildAddressables()
{
Console.WriteLine("Building Addressables");
AddressableAssetSettings.BuildPlayerContent();
Console.WriteLine("Finished Building Addressables");
}
and call it from the PerformBuild method before building.
static void PerformBuild()
{
Console.WriteLine(":: Performing build");
BuildAddressables();
....
To fix the tests I also passed in this static method as the executeMethod in test.sh
${UNITY_EXECUTABLE:-xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' /opt/Unity/Editor/Unity} \
-projectPath $(pwd) \
-runTests \
-testPlatform $TEST_PLATFORM \
-testResults $(pwd)/$TEST_PLATFORM-results.xml \
-logFile /dev/stdout \
-executeMethod BuildCommand.BuildAddressables \
-batchmode