ci: v2 build + unit + integration workflow, nightly E2E (Task 61)
.github/workflows/v2-ci.yml runs on push/PR to v2-akka-fuse + master:
- build job: dotnet restore + build (Release)
- unit-tests job: matrix over the 5 v2 test projects (Cluster, ControlPlane,
Runtime, Security, OpcUaServer) with Category!=E2E
- integration job: Host.IntegrationTests with Category!=E2E
.github/workflows/v2-e2e.yml runs nightly at 03:00 UTC + workflow_dispatch:
- Brings up the docker-dev four-node fleet (admin pair + driver pair + SQL
+ LDAP + Traefik)
- Waits up to 60s for /health/active to return 200
- Runs Category=E2E only
- Always tears down with -v
Both workflows pin .NET 10 via actions/setup-dotnet (no global.json so any
10.0 SDK works). Compatible with both GitHub Actions and Gitea Actions
(act_runner). The E2E filter currently matches zero tests because the
tests/Server/ZB.MOM.WW.OtOpcUa.E2ETests project doesn't exist yet — it lands
when F10/F11/F12 wire enough engine for an end-to-end round-trip to be
meaningful.
This commit is contained in:
70
.github/workflows/v2-ci.yml
vendored
Normal file
70
.github/workflows/v2-ci.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
# CI for the v2 branch — runs on every push + PR to the v2-akka-fuse / master
|
||||||
|
# branches. Layered into three jobs:
|
||||||
|
# build dotnet restore + build (fast feedback on compile errors)
|
||||||
|
# unit-tests every v2 unit-test project
|
||||||
|
# integration 2-node Host.IntegrationTests harness
|
||||||
|
#
|
||||||
|
# Skips E2E (Category=E2E) — that runs nightly via v2-e2e.yml against the full
|
||||||
|
# four-node docker-dev stack.
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
project:
|
||||||
|
- tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests
|
||||||
|
- tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests
|
||||||
|
- tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests
|
||||||
|
- tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests
|
||||||
|
- tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: 10.0.x
|
||||||
|
- name: dotnet test ${{ matrix.project }}
|
||||||
|
run: dotnet test ${{ matrix.project }} --configuration Release --filter "Category!=E2E"
|
||||||
|
|
||||||
|
integration:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: 10.0.x
|
||||||
|
- name: dotnet test Host.IntegrationTests
|
||||||
|
run: dotnet test tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests --configuration Release --filter "Category!=E2E"
|
||||||
57
.github/workflows/v2-e2e.yml
vendored
Normal file
57
.github/workflows/v2-e2e.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
# Nightly E2E job. Runs against the docker-dev four-node fleet (admin-a +
|
||||||
|
# admin-b + driver-a + driver-b + SQL + LDAP + Traefik). Trigger:
|
||||||
|
# - cron at 03:00 UTC daily
|
||||||
|
# - workflow_dispatch from the Actions UI for on-demand runs
|
||||||
|
#
|
||||||
|
# The E2E test project (tests/Server/ZB.MOM.WW.OtOpcUa.E2ETests) does not yet
|
||||||
|
# exist — it lands when the F-series follow-ups F10/F11/F12 wire enough of the
|
||||||
|
# SDK/historian/probe so an end-to-end driver round-trip is meaningful. Until
|
||||||
|
# then this workflow is a green no-op (the `--filter Category=E2E` matches
|
||||||
|
# zero tests, and `dotnet test` returns 0).
|
||||||
|
|
||||||
|
name: v2-e2e
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 3 * * *"
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
env:
|
||||||
|
DOTNET_NOLOGO: "1"
|
||||||
|
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
e2e:
|
||||||
|
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: Build docker-dev fleet
|
||||||
|
run: docker compose -f docker-dev/docker-compose.yml up -d --build
|
||||||
|
|
||||||
|
- name: Wait for cluster
|
||||||
|
run: |
|
||||||
|
for i in $(seq 1 30); do
|
||||||
|
if curl -sf http://localhost/health/active >/dev/null; then
|
||||||
|
echo "Admin leader healthy after ${i}s"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
echo "Timed out waiting for /health/active"
|
||||||
|
docker compose -f docker-dev/docker-compose.yml logs --tail=200
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
- name: dotnet test (E2E only)
|
||||||
|
run: dotnet test --configuration Release --filter "Category=E2E"
|
||||||
|
|
||||||
|
- name: Tear down
|
||||||
|
if: always()
|
||||||
|
run: docker compose -f docker-dev/docker-compose.yml down -v
|
||||||
Reference in New Issue
Block a user