mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-21 09:06:37 +08:00
e3e7134d56
Resolved NodeSetExportTools.cs conflict by adopting base branch's ResolveExportPath / ExportRoot abstraction (configurable via OPCUA_MCP_EXPORT_ROOT env var) and removing my redundant ResolveAndValidateExportPath helper + NodeSetExportPathValidationTests.cs. Base implementation is functionally a superset of F19's hard-coded LocalAppData approach.
81 lines
2.2 KiB
YAML
81 lines
2.2 KiB
YAML
name: Connection Stability Test
|
|
|
|
on:
|
|
schedule:
|
|
# Run nightly at 2:00 AM UTC
|
|
- cron: '0 2 * * *'
|
|
workflow_dispatch:
|
|
inputs:
|
|
duration:
|
|
description: 'Test duration in minutes'
|
|
required: false
|
|
default: '90'
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
stability-test:
|
|
name: Connection Stability Test
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 120 # Allow extra time beyond test duration for setup/teardown
|
|
|
|
env:
|
|
DOTNET_VERSION: '10.0.x'
|
|
TARGET_FRAMEWORK: 'net10.0'
|
|
CONFIGURATION: 'Release'
|
|
TEST_DURATION_MINUTES: ${{ github.event.inputs.duration || '90' }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup .NET ${{ env.DOTNET_VERSION }}
|
|
uses: actions/setup-dotnet@v5
|
|
with:
|
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
|
|
|
- name: Set Cloud Version
|
|
shell: pwsh
|
|
run: ./.azurepipelines/set-version.ps1
|
|
|
|
- name: Restore dependencies
|
|
run: dotnet restore 'UA.slnx'
|
|
|
|
- name: Build Client Tests
|
|
run: dotnet build ./Tests/Opc.Ua.Client.Tests/Opc.Ua.Client.Tests.csproj --configuration ${{ env.CONFIGURATION }} --no-restore
|
|
|
|
- name: Run Connection Stability Test
|
|
run: |
|
|
echo "Starting connection stability test for $TEST_DURATION_MINUTES minutes"
|
|
dotnet test ./Tests/Opc.Ua.Client.Tests/Opc.Ua.Client.Tests.csproj \
|
|
--configuration ${{ env.CONFIGURATION }} \
|
|
--no-build \
|
|
--framework ${{ env.TARGET_FRAMEWORK }} \
|
|
--filter "Category=ConnectionStability" \
|
|
--logger "console;verbosity=detailed" \
|
|
--results-directory ./TestResults
|
|
timeout-minutes: 110 # Slightly longer than expected test duration
|
|
env:
|
|
TEST_DURATION_MINUTES: ${{ env.TEST_DURATION_MINUTES }}
|
|
|
|
- name: Upload test results
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: stability-test-results
|
|
path: ./TestResults
|
|
if: always()
|
|
|
|
- name: Check test results
|
|
if: always()
|
|
run: |
|
|
if [ -f ./TestResults/*.trx ]; then
|
|
echo "Test results found"
|
|
cat ./TestResults/*.trx
|
|
else
|
|
echo "No test results found"
|
|
fi
|