Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ runs:
with:
python-version: 3.11.5

- name: Setup .NET
- name: Setup .NET 8.0.203
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.203

- name: Setup .NET 7.0.306
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.306
38 changes: 36 additions & 2 deletions .github/workflows/nunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
type: string

jobs:
generate-codes:
NUnit-Test:
runs-on: macos-latest
steps:
- name: Checkout
Expand All @@ -37,10 +37,44 @@ jobs:

# Extract to project root directory
unzip -o iris_mac_unity.zip -d $GITHUB_WORKSPACE
ls $GITHUB_WORKSPACE

# Clean up temporary directory
cd $GITHUB_WORKSPACE
rm -rf temp_download

echo "Successfully downloaded and extracted Iris Mac Unity package to project root directory"

- name: Run NUnit tests
run: |
# Find directory starting with iris and store in variable
IRIS_DIR=$(find $GITHUB_WORKSPACE -type d -name "iris*" | head -n 1)

if [ -z "$IRIS_DIR" ]; then
echo "Error: No directory starting with iris found"
exit 1
else
echo "Found Iris directory: $IRIS_DIR"
fi

# Check if IRIS_DIR name contains DCG
if [[ "$IRIS_DIR" == *"DCG"* ]]; then
echo "IRIS Type is DCG"
AGORA_LIB_NAME=$IRIS_DIR/Debugger/MAC/IrisDebugger.framework/Versions/A/IrisDebugger
DEBUG_LIB_NAME=$IRIS_DIR/Debugger/MAC/IrisDebugger.framework/Versions/A/IrisDebugger
sh terra/nunit_run.sh $AGORA_LIB_NAME $DEBUG_LIB_NAME ${{ inputs.fully_qualified_name }}
else
echo "IRIS Type is RTM"
AGORA_LIB_NAME=$IRIS_DIR/Debugger/MAC/IrisDebugger.framework/Versions/A/IrisDebugger
DEBUG_LIB_NAME=$IRIS_DIR/Debugger/MAC/IrisDebugger.framework/Versions/A/IrisDebugger
sh terra/nunit_run.sh $AGORA_LIB_NAME $DEBUG_LIB_NAME ${{ inputs.fully_qualified_name }}
fi

echo "NUnit tests completed"

- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: nunit-test-results
path: ${{ github.workspace }}/testResults.xml
if-no-files-found: error
retention-days: 7
5 changes: 5 additions & 0 deletions Agora-C_Sharp-RTC-SDK/Code/Rtm/Internal/Types/AgoraRtmBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ public class Metadata

public ulong itemCount;

public Metadata()
{

}

public Metadata(Agora.Rtm.Metadata metadata)
{
this.majorRevision = metadata.majorRevision;
Expand Down
1 change: 0 additions & 1 deletion terra/nunit_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@ fi
echo "All files have been updated successfully"

dotnet test ${UT_CSPROJ_PATH} --filter FullyQualifiedName~${FULLY_QUALIFIED_NAME} --logger "trx;LogFileName=${PROJECT_ROOT}/testResults.xml"
ls ${PROJECT_ROOT}
Loading