Files
lmxopcua/.github/workflows/v2-ci.yml
T
Joseph Doherty 67de2c942b ci(r2-12): delete no-op nightly E2E workflow + redundant integration matrix (07/S-3, 07/P-5)
- v2-e2e.yml deleted: its `--filter Category=E2E` matches zero tests repo-wide (the
  E2ETests project doesn't exist) so it reported a permanent false green; and its
  docker-dev fleet binds the LAN-only shared GLAuth (10.100.0.35:3893) + builds local
  images, so it isn't hosted-runner-bootable anyway. FOLLOW-UP: when a runner-reachable
  fleet + a real tests/Server/...E2ETests land, add a fresh workflow WITH a zero-match
  guard (fail if Category=E2E matches nothing).
- v2-ci.yml integration matrix removed: fully redundant with the unit-tests leg, which
  already runs both Host.IntegrationTests + OpcUaServer.IntegrationTests under the
  identical filter, fixtureless, gated at MIN_EXECUTED=1. No coverage lost. The S-2
  option-#2 fixture-backed-leg follow-up is preserved as a NOTE comment in the workflow.
Header comments updated; YAML validates; jobs are now build -> unit-tests.
2026-07-13 09:54:22 -04:00

87 lines
3.9 KiB
YAML

# CI for the v2 branch — runs on every push + PR to the v2-akka-fuse / master
# branches. Layered into two jobs:
# build dotnet restore + build (fast feedback on compile errors)
# unit-tests the WHOLE solution minus the env-gated tiers (self-maintaining)
#
# Skips E2E (Category=E2E) and LiveIntegration (needs a real gateway/PLC/VPN) — both
# are env-gated tiers with no hosted-runner fixtures. (The skip-gated *.IntegrationTests
# still run in the unit-tests leg and Assert.Skip when their fixtures are unreachable.)
#
# Compatible with both GitHub Actions and Gitea Actions (act_runner). The .NET 10
# SDK is pinned via global.json at the repo root; if no global.json exists, the
# setup-dotnet step falls back to dotnet-version below.
name: v2-ci
on:
push:
branches: [v2-akka-fuse, master]
pull_request:
branches: [v2-akka-fuse, master]
workflow_dispatch: {}
env:
DOTNET_NOLOGO: "1"
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: dotnet restore
run: dotnet restore ZB.MOM.WW.OtOpcUa.slnx
- name: dotnet build
run: dotnet build ZB.MOM.WW.OtOpcUa.slnx --no-restore --configuration Release
unit-tests:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: dotnet restore
run: dotnet restore ZB.MOM.WW.OtOpcUa.slnx
# 07/S-1: ONE whole-solution leg instead of a hand-maintained 5-project matrix that
# silently dropped Client (388 tests), Analyzers (31), and every driver + most Core suite.
# Self-maintaining — a new *.Tests project is covered automatically, no matrix to widen —
# and matches CLAUDE.md's own `dotnet test ZB.MOM.WW.OtOpcUa.slnx` guidance. Excludes only
# the env-gated tiers: E2E (nightly, needs the docker-dev fleet) and LiveIntegration (needs
# a real gateway/PLC/VPN). The skip-gated *.IntegrationTests Assert.Skip when their fixtures
# are unreachable, so they run harmlessly here (and are counted by the skip-gate below).
- name: dotnet test (whole solution, minus E2E + LiveIntegration)
run: >
dotnet test ZB.MOM.WW.OtOpcUa.slnx --configuration Release --no-restore
--filter "Category!=E2E&Category!=LiveIntegration"
--logger "trx" --results-directory artifacts/trx
# 07/S-2 fail-on-skip: a whole-solution run that executed ZERO tests is a masked outage
# (bad filter, broken discovery), not a pass — fail loudly. Runs even on test failure so
# the diagnostic is always emitted.
- name: assert not-all-skipped
if: always()
run: bash scripts/ci/assert-not-all-skipped.sh artifacts/trx/*.trx
- name: upload trx
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-trx
path: artifacts/trx/*.trx
if-no-files-found: warn
# NOTE (07/P-5): the former `integration` matrix job (Host.IntegrationTests +
# OpcUaServer.IntegrationTests) was removed as fully redundant — the unit-tests leg
# above already runs BOTH projects under the identical filter, fixtureless, and gates
# them at MIN_EXECUTED=1. Its only unique output was a report-only skip tally the unit
# leg's trx already contains. FOLLOW-UP (S-2 option #2): if a fixture-backed integration
# leg is wanted, add it as a NEW job that starts the one public-image fixture as a
# `services:` block (mcr.microsoft.com/iotedge/opc-plc; the modbus/S7/AB/FOCAS sims are
# locally-built `otopcua-*` images not pullable here), sets OPCUA_SIM_ENDPOINT, and gates
# at MIN_EXECUTED=1 so a fixture outage turns the job red — covering something the unit
# leg cannot, rather than re-running the same fixtureless tests.