Skip to content

Migrate build to go-task and CI to GitHub Actions - #24

Merged
koenvanexem merged 7 commits into
mainfrom
feature/github-actions
Jun 3, 2026
Merged

koenvanexem merged 7 commits into
mainfrom
feature/github-actions

Conversation

@koenvanexem

Copy link
Copy Markdown
Member

Replaces the Nuke build with a go-task Taskfile and moves CI from Azure Pipelines to GitHub Actions.

Build (commit 1)

  • Taskfile.yml replaces build/ + build.cmd|ps1|sh + .nuke (targets: restore, compile, test, pack, ci)
  • GitVersion -> Nerdbank.GitVersioning (version.json, auto-referenced via src/Directory.Build.props)
  • Interop OnNew event-ordering fixes, headless PDF/XPS save fix, test fixtures (blank.xlsx), VSTO signing key checked in for CI import

CI (commit 2)

  • ci.yml - push/PR to main + manual dispatch. Excel32/Excel64 matrix on windows-latest: installs Office via choco (--forcex86 for the 32-bit lane), imports the VSTO cert, runs task ci CONFIGURATION=Release. Test results published as check runs (xunit XML + TRX) and uploaded as artifacts; nupkgs packed and uploaded on the Excel64 lane.
  • release.yml - v*.*.* tags + manual dispatch. Packs and pushes to NuGet.org via OIDC trusted publishing (nuget/login@v1, user allors-nuget, environment nuget-release, --skip-duplicate), then creates a GitHub release. No long-lived API key.
  • version.json: v* tags added to publicReleaseRefSpec so tag builds get public versions
  • README badge swapped; azure-pipelines.yml removed

Conventions mirror allors/tram-dotnet (v4 actions, concurrency group, ci/release split). Divergence: the release workflow packs but does not re-run tests (they need a ~20 min Office install; the tagged commit is already green on main).

Before the first release

  1. nuget.org (as allors-nuget): add a Trusted Publishing policy - owner allors, repo excel, workflow release.yml, environment nuget-release
  2. GitHub: create the nuget-release environment (optionally with required reviewers)
  3. Tag with nbgv tag so the tag matches the computed version
  4. Decommission the Azure DevOps pipeline and Excel/Excel feed

The CI run on this PR is the end-to-end verification (both Excel lanes).

Replace the Nuke build (build/, build.cmd|ps1|sh, .nuke) with a
Taskfile and switch versioning from GitVersion to
Nerdbank.GitVersioning (version.json, src/Directory.Build.props).
Point the Azure pipeline at the task targets and check in the VSTO
signing key so CI can import it.

Also fix interop OnNew ordering (existing worksheets are notified
before the workbook; worksheets added during OnNew(workbook) are
notified by Workbook itself), drop the empty-file PDF/XPS save guard
in Headless, and update tests with blank.xlsx fixtures.
Add ci.yml (Excel32/Excel64 matrix on windows-latest: installs Office
via choco, imports the VSTO signing cert, runs task ci, publishes test
results and nupkg artifacts) and release.yml (v* tag triggered: packs
and pushes to NuGet.org via OIDC trusted publishing, then creates a
GitHub release).

Allow public release versions on v* tags in version.json, swap the
README badge, and drop azure-pipelines.yml.
@github-actions

github-actions Bot commented Jun 2, 2026 •

Copy link
Copy Markdown

Test Results (Excel64)

  5 files    8 suites   7m 42s ⏱️
149 tests 149 ✅ 0 💤 0 ❌
160 runs  160 ✅ 0 💤 0 ❌

Results for commit bf73f9e.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jun 2, 2026 •

Copy link
Copy Markdown

Test Results (Excel32)

  5 files    8 suites   6m 12s ⏱️
149 tests 149 ✅ 0 💤 0 ❌
160 runs  160 ✅ 0 💤 0 ❌

Results for commit bf73f9e.

♻️ This comment has been updated with latest results.

A failing pass (e.g. one flaky VSTO test) aborted task test at that
command, so later passes never ran and produced no result files. Run
all five passes in one script, collect the failing pass names, and
fail at the end when any pass failed.
The 1G-char case (a 2 GB BSTR) cannot be marshaled into 32-bit Excel
over COM and fails with E_OUTOFMEMORY on every Excel32 run. SetString
is a passthrough to a single DocumentProperties value, so the 1G case
stressed Excel rather than this library; 1M chars already proves
arbitrary-length support well past the native property limit.
On CI, Excel intermittently dies mid-Workbook.Close (RPC failure
0x800706BE, observed after ShowInputMessage leaves an input-message
validation on the workbook), failing tests whose assertions had
already passed.

Harden the four interop test fixtures: snapshot the Workbooks
collection before closing (closing while enumerating the live COM
collection is undefined), catch COMException around Close/Quit, and
kill the Excel process by pid - captured at construction, while the
Hwnd is still resolvable - so a hung instance cannot leak into later
tests.
actions/checkout@v6, setup-dotnet@v5 and upload-artifact@v7 replace
the v4 versions, which run on Node 20 and get force-switched to
Node 24 on June 16, 2026.
The Dna and Vsto test projects carried four verbatim copies of the
Excel fixture (application setup, pid capture, AddWorkbook, the
crash-tolerant teardown). Single inheritance forbids one common base
for all four - they derive from two different fact bases - so the
logic moves to a fixture object fronted by one thin abstract base per
test kind.

New Allors.Excel.Interop.Tests.Shared project (net462, not packable):
InteropExcelFixture owns all the logic; InteropWorksheetTests and
InteropWorkbookTests delegate to it. The per-project classes are now
empty shells whose namespaces keep the per-suite test names in CI
reporting.
@koenvanexem
koenvanexem merged commit 10d15c6 into main Jun 3, 2026
4 checks passed
@koenvanexem
koenvanexem deleted the feature/github-actions branch June 3, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant