Files
lmxopcua/.github/workflows/v2-e2e.yml
T
Joseph Doherty ac1b33555a test(infra): port-NAT opc-plc fixture for the NAT browse tests; wire OPCUA_NAT_ENDPOINT into CI (#813)
Docker/nat/docker-compose.yml (stack /opt/otopcua-opcuaclient-nat on 10.100.0.35,
project: lmxopcua label): opc-plc 2.14.10 advertising --ph=otopcua-opc-plc-nat-private.invalid
on internal 50000, published on 50010, so every advertised URL is unreachable on host AND
port. Deployed; NatPublishedEndpointBrowseTests 3/3 against opc.tcp://10.100.0.35:50010
(and the secure case positive once, with the fixture cert temporarily trusted).

CI: integration-fixtures.sh starts a throwaway otopcua-ci-opcplc-nat (50110->50000) and
exports OPCUA_NAT_ENDPOINT; v2-e2e.yml points it at the shared stack. infra/README.md,
scripts/ci/README.md and the fixture README document it.
2026-11-10 22:53:01 -05:00

77 lines
3.5 KiB
YAML

# Guarded E2E workflow (#757 item a). UNVERIFIED on a hosted runner until its first run.
#
# Runs the simulator-backed driver integration projects against the shared fixture fleet on
# 10.100.0.35 (the fixtures' own default endpoints: Modbus :5020, S7 :1102, opc-plc :50000). That fleet
# is only reachable from a runner on the right network, so this workflow is:
# * MANUAL or SCHEDULED only — never push/PR, so it can never slow or flake the unit-tests leg;
# * SKIP-CLEAN — a TCP probe runs first and every later step is conditioned on it, so an unreachable
# fleet ends the run green with an explicit "skipped" notice rather than a wall of Assert.Skip;
# * ZERO-MATCH GUARDED — once the fleet is reachable, MIN_EXECUTED turns "everything skipped / filter
# matched nothing" (the failure mode that made the old v2-e2e.yml a silent no-op) into a RED job.
# Note: no test currently carries Category=E2E, so the guard is the executed-count floor over the
# fleet-backed projects rather than a Category=E2E match.
# Self-contained (throwaway-container) coverage lives in v2-integration.yml, not here.
name: v2-e2e
on:
workflow_dispatch: {}
schedule:
- cron: "17 3 * * 0" # weekly, Sunday 03:17 UTC (off-peak, off the :00 mark)
# Own group; same semantics as v2-ci (one active run, an active run is never cancelled).
concurrency:
group: lmxopcua-v2-e2e
cancel-in-progress: false
env:
DOTNET_NOLOGO: "1"
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 90 # #718 guard
steps:
- uses: actions/checkout@v4
- name: probe fixture fleet
id: probe
run: bash scripts/ci/probe-e2e-fixtures.sh
- name: skipped — fixture fleet unreachable
if: steps.probe.outputs.reachable != 'true'
run: echo "::notice::E2E skipped — shared fixture fleet 10.100.0.35 is not reachable from this runner."
- uses: actions/setup-dotnet@v4
if: steps.probe.outputs.reachable == 'true'
with:
dotnet-version: 10.0.x
- name: dotnet test (fleet-backed projects)
if: steps.probe.outputs.reachable == 'true'
env:
E2E_PROJECTS: >-
Driver.Modbus Driver.S7 Driver.OpcUaClient Driver.OpcUaClient.Browser
# #813: the port-NAT opc-plc stack (/opt/otopcua-opcuaclient-nat). Not in the probe's required ports —
# NatPublishedEndpointBrowseTests TCP-probe it themselves and skip if it is down.
OPCUA_NAT_ENDPOINT: opc.tcp://10.100.0.35:50010
run: |
set -euo pipefail
for p in $E2E_PROJECTS; do
dotnet test "tests/Drivers/ZB.MOM.WW.OtOpcUa.$p.IntegrationTests/ZB.MOM.WW.OtOpcUa.$p.IntegrationTests.csproj" \
--configuration Release -m:1 --settings scripts/ci/ci.runsettings \
--filter "Category!=LiveIntegration" \
--logger "trx;LogFileName=$p.trx" --results-directory artifacts/trx \
--blame-hang --blame-hang-timeout 20m --blame-hang-dump-type none
done
- name: assert not-all-skipped
if: always() && steps.probe.outputs.reachable == 'true'
env:
MIN_EXECUTED: "35"
run: bash scripts/ci/assert-not-all-skipped.sh artifacts/trx/*.trx
- name: upload trx
if: always() && steps.probe.outputs.reachable == 'true'
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: e2e-trx
path: artifacts/trx/*.trx
if-no-files-found: warn