Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Sandbox validation of CI_Toolkit PR #9: forces the ci-serialisation baseline leg.
# Pinned to the fix branch. Not for merge.
name: CI
on:
pull_request:
branches: [develop]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci-serialisation:
runs-on: windows-2025-vs2026
timeout-minutes: 90
steps:
- uses: BuroHappoldEngineeringSandbox/CI_Toolkit/.github/actions/ci-serialisation@validate/item4-integration
with:
app_id: ${{ secrets.BHOM_APP_ID }}
private_key: ${{ secrets.BHOM_APP_PRIVATE_KEY }}
base_ref: ${{ github.base_ref }}
36 changes: 36 additions & 0 deletions XML_oM/Item4Fixture/UnserialisableFixture.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* DELIBERATE SERIALISATION FIXTURE. NOT FOR MERGE.
*
* Authored to validate CI_Toolkit PR #9 (findings-register item 4). ci-serialisation only
* runs its baseline leg when the branch leg reports status == 'Error', and no sandbox repo
* currently produces a serialisation failure, so the baseline path had never executed under
* the fix. This type forces one.
*
* Why it fails: Helpers.ObjectTypesToTest() selects every non-abstract IObject whose every
* property sits in a BH.* or System.* namespace, so System.IntPtr passes selection. The BHoM
* serialiser has no BSON mapping for IntPtr, so ToJson() throws, Verify records an error, the
* json comes back empty and ObjectToFromJson returns TestStatus.Error for this type.
*
* The failure is subject-side and exists only on this branch, so the baseline leg should not
* see it and the comparator should report a regression. That is the intended outcome.
*/

using System;
using System.Collections.Generic;

using BH.oM.Base;

namespace BH.oM.XML.Item4Fixture
{
public class UnserialisableFixture : IBHoMObject
{
// The whole fixture: IntPtr has no BSON serialiser.
public virtual IntPtr Handle { get; set; } = IntPtr.Zero;

public virtual Guid BHoM_Guid { get; set; } = Guid.NewGuid();
public virtual Dictionary<string, object> CustomData { get; set; } = new Dictionary<string, object>();
public virtual string Name { get; set; } = "";
public virtual FragmentSet Fragments { get; set; } = new FragmentSet();
public virtual HashSet<string> Tags { get; set; } = new HashSet<string>();
}
}
Loading