Skip to content

feat(endpoints): add native C# endpoint host #48

feat(endpoints): add native C# endpoint host

feat(endpoints): add native C# endpoint host #48

Workflow file for this run

name: regression
# Regression gate for the Azure-native branch. On PRs to main/dev and pushes to dev it (1) compiles the
# AzureTables configuration and (2) runs the combined-role E2E suite (Azurite + orchestrator + scheduler
# + realtime + API dispatch), failing if any subsystem check fails. Doc-only changes don't trigger it.
on:
push:
branches: [dev]
paths:
- 'build/**'
- 'docker/**'
- 'Runtime/**'
- 'Services/**'
- 'Craft.csproj'
- 'Craft.sln'
- 'tests/**'
- 'Directory.Build.props'
- 'global.json'
- '.editorconfig'
pull_request:
branches: [main, dev]
paths:
- 'build/**'
- 'docker/**'
- 'Runtime/**'
- 'Services/**'
- 'Craft.csproj'
- 'Craft.sln'
- 'tests/**'
- 'Directory.Build.props'
- 'global.json'
- '.editorconfig'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: regression-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Style gate. Enforces .editorconfig via `dotnet format`, which auto-fixes everything it checks —
# a failure here is always resolved by running `dotnet format` locally and committing the result.
# Runs before build so a formatting-only mistake fails in ~30s instead of after the E2E suite.
lint:
name: lint (format + analyzers)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# No dotnet-version here on purpose: global.json pins the SDK, and setup-dotnet honours it.
# That keeps CI, build/Dockerfile and developer machines on one Roslyn + analyzer set.
- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Verify formatting (.editorconfig)
run: dotnet format Craft.sln --severity warn --verify-no-changes
# The repo builds at zero warnings with AnalysisLevel=latest-recommended. This asserts it stays
# that way without TreatWarningsAsErrors, which would also fail builds on transient SDK warnings.
# See the analyzer backlog in .editorconfig for the rules still held at `suggestion`.
- name: Assert zero build warnings
run: |
dotnet build Craft.sln -c Release --nologo --no-incremental 2>&1 | tee build.log
count=$(grep -cE ': warning [A-Z]+[0-9]+' build.log || true)
if [ "$count" -ne 0 ]; then
echo "::error::$count build warning(s) — the build must stay warning-clean."
grep -E ': warning [A-Z]+[0-9]+' build.log | sort -u
exit 1
fi
echo "Build is warning-clean."
build:
name: build + unit tests (AzureTables)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Build — AzureTables
run: dotnet build Craft.sln -c Release --nologo
# Fast feedback ahead of the ~15 minute E2E job. Includes the PowerShell-contract guard, which
# is the only thing standing between a namespace rename and a runtime break in downstream apps.
- name: Unit tests
run: dotnet test Craft.sln -c Release --nologo --no-build
# The setup wizard is an embedded HTML page, so its branch table is the one piece of shipped
# logic dotnet test cannot reach. node --test with no package.json and no install — the runner
# is built in, and ubuntu-latest already has Node.
- name: Unit tests (setup wizard)
run: node --test "tests/setup-wizard/**/*.test.mjs"
e2e:
name: e2e (combined role, Azurite)
runs-on: ubuntu-latest
needs: [lint, build]
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
# Build the AzureTables image the E2E stack runs (compose references it as craft:ci).
- name: Build image
run: docker build -f build/Dockerfile -t craft:ci .
# Brings up Azurite + the SUT (combined role), asserts every subsystem PASS/FAIL, and exits
# non-zero on any failure. pwsh, docker, and docker compose are preinstalled on ubuntu-latest.
- name: Run combined-role E2E suite
shell: pwsh
run: perf-harness/scripts/run-e2e.ps1 -SutImage craft:ci