Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
570513e
Add test setup project
IsakNaslundBh May 30, 2025
0528bb9
Add abstract runner for datadriven UTs
IsakNaslundBh May 30, 2025
4a9149a
Base abstract runner for compliance
IsakNaslundBh May 30, 2025
31aa6ff
Base abstract runner for serialisation
IsakNaslundBh May 30, 2025
e9a38eb
Slight file restructure
IsakNaslundBh May 30, 2025
acd1473
Simplify the Static method requirement through base class and better …
IsakNaslundBh May 30, 2025
51a5652
Minor tweaks to UTs, improving assertion and displaying message for p…
IsakNaslundBh May 30, 2025
92d8362
Merge branch 'develop' into Test_Toolkit-InvestigateRunningAllChecksT…
IsakNaslundBh Jun 3, 2025
47ab5b1
Change format of code co0mpliance engine
IsakNaslundBh Jun 4, 2025
f375eb8
Speed up running of checks
IsakNaslundBh Jun 4, 2025
a1e9828
Update CurrentFolder.cs
IsakNaslundBh Jun 4, 2025
9acde0b
Updace COmpliance_oM to new format and change target of compliance_oM…
IsakNaslundBh Jun 5, 2025
af95587
Add method for scanning files, excluding specific folders
IsakNaslundBh Jun 5, 2025
9f83ed8
bump codeAnalysis package used in TEstSetup_Engine
IsakNaslundBh Jun 5, 2025
f1b3722
Merge branch 'develop' into Test_Toolkit-InvestigateRunningAllChecksT…
IsakNaslundBh Aug 27, 2025
2c8229d
Prototype for version 2 of general compliance checks, displaying all …
IsakNaslundBh Aug 27, 2025
9bc92a7
Additional tweaks to handle input parameters if available
IsakNaslundBh Aug 29, 2025
eab77ee
_Dependencies_
IsakNaslundBh Aug 29, 2025
a359fea
Add separate test projects for different types of tests
IsakNaslundBh Sep 2, 2025
f4954c9
Remove temporary postbuildevents
IsakNaslundBh Sep 2, 2025
e3c2d84
Change OutputPath to OutDir for code compliance
IsakNaslundBh Sep 2, 2025
455506b
Temporarily push up build folder content
IsakNaslundBh Sep 2, 2025
cd56161
Add CI check
IsakNaslundBh Sep 2, 2025
61501a8
Change strategy for assembly resolution from GlobalInit to instead ma…
IsakNaslundBh Sep 16, 2025
9f63e2e
Make UnitTest_Tests into its own test project
IsakNaslundBh Sep 16, 2025
66980cc
Clean up weird build config
IsakNaslundBh Sep 16, 2025
46d934e
Centralise current assemblies
IsakNaslundBh Sep 16, 2025
c0dd7fb
Change target folder for StartupHook
IsakNaslundBh Sep 16, 2025
c8800dd
Include startup hook in the artefact
IsakNaslundBh Sep 16, 2025
6f6e174
DO nto crash out for no UnitTest found
IsakNaslundBh Sep 16, 2025
6968273
push dlls
IsakNaslundBh Sep 16, 2025
8811518
bump all projects to net8.0
IsakNaslundBh Sep 18, 2025
c88480e
Update build files
IsakNaslundBh Sep 18, 2025
f978a34
repush dlls without hardcoded BHoM_Engine folder
IsakNaslundBh Sep 18, 2025
1d269b8
clean up runsettings file
IsakNaslundBh Sep 18, 2025
cbf3200
Move test projects to sln folder
IsakNaslundBh Sep 22, 2025
ef25c59
Remove no longer required base test class
IsakNaslundBh Sep 23, 2025
0d2ed96
Updated build files
IsakNaslundBh Sep 23, 2025
cc9a207
Fix issue with startup hook polluting global environment
IsakNaslundBh Sep 24, 2025
a3fc3f9
Cleanup and separation of serialisation tests
IsakNaslundBh Sep 24, 2025
5170307
Repush updated dlls
IsakNaslundBh Sep 24, 2025
146b84b
Try add identify tests step to workflow
IsakNaslundBh Sep 24, 2025
2ef2a86
exclude nunit.* as well from test identification
IsakNaslundBh Sep 24, 2025
4b69336
Fix naming of compliance test project (add missing ending s)
IsakNaslundBh Sep 25, 2025
d61efa8
Fixes to code compliance
IsakNaslundBh Sep 25, 2025
03f3789
Fixes to project compliance to correctly fail
IsakNaslundBh Sep 25, 2025
c809ffa
Repush updated dlls
IsakNaslundBh Sep 25, 2025
9d71cd2
Repush dlls again
IsakNaslundBh Sep 25, 2025
caff8eb
Repush again with correct files this time
IsakNaslundBh Sep 25, 2025
4c6ec55
Improvements to handling of complaince files
IsakNaslundBh Sep 25, 2025
715ed3e
build files
IsakNaslundBh Sep 25, 2025
c32fc2e
Further simplification and descriptions of the compliance runner
IsakNaslundBh Sep 26, 2025
6f217a2
Repush dlls
IsakNaslundBh Sep 26, 2025
faa7987
Repush compiled dlls without hardcoded folder
IsakNaslundBh Sep 26, 2025
66356a9
Fix issue with missing . for test files
IsakNaslundBh Sep 26, 2025
982521f
Repush build files
IsakNaslundBh Sep 26, 2025
0ab35ad
Add support for inputing current repository, or extract from git conf…
IsakNaslundBh Sep 26, 2025
163507b
Update build files
IsakNaslundBh Sep 26, 2025
39ad560
Change startuphook location to C\ProgramData\BHoM folder
IsakNaslundBh Sep 26, 2025
c42bc02
Change location for text file to trigger running locally
IsakNaslundBh Sep 26, 2025
7f7116e
Another dll update
IsakNaslundBh Sep 26, 2025
6e52b13
Merge branch 'develop' into Test_Toolkit-InvestigateRunningAllChecksT…
IsakNaslundBh Sep 29, 2025
a8457b5
Remove temporary target branch from yaml file
IsakNaslundBh Sep 29, 2025
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
98 changes: 98 additions & 0 deletions .github/workflows/build-tests-artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Build Tests Artifact

on:
workflow_dispatch:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:
collect-and-upload-tests:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Create _Tests_ directory
run: mkdir -p _Tests_

# TODO: The toolkit will need to be built before copying files. This will need to be done before this step, including building the dependecies BHoM, BHoM_Engine and BHoM_Adapter.continue-on-error:
# TODO: For now this is just pushing up the files that are already in the Build directory to enable quicker evaluation of overall workflow of test files.
- name: Copy files from Build directory
run: |
# Copy .dll files (only from Build directory, not subdirectories)
find Build -maxdepth 1 -name "*.dll" -type f -exec cp {} _Tests_/ \;

# Copy .exe files (only from Build directory, not subdirectories)
find Build -maxdepth 1 -name "*.exe" -type f -exec cp {} _Tests_/ \;

# Copy .json files (only from Build directory, not subdirectories)
find Build -maxdepth 1 -name "*.json" -type f -exec cp {} _Tests_/ \;


# List copied files for verification
echo "Files copied to _Tests_:"
ls -la _Tests_/

- name: Identify tests
run: |
set -euo pipefail
echo "Searching for test DLLs in _Tests_ folder..."

tests_dir="_Tests_"
if [ ! -d "$tests_dir" ]; then
echo "✗ $tests_dir folder not found"
exit 1
fi

# Prepare output file
out_file="$tests_dir/TestDlls.txt"
: > "$out_file"

found=0
shopt -s nullglob
for dll in "$tests_dir"/*.dll; do
base=$(basename "$dll" .dll)

# Skip known non-test DLLs by name patterns
case "$base" in
NUnit_Engine|TestSetup_Engine|testhost|testcentric.engine.metadata|\
Microsoft.*|System.*|nunit3.*|nunit.*|NUnit3.*|Newtonsoft.*|NuGet.*)
continue ;;
*_oM|*_Engine)
continue ;;
esac

# Check for test frameworks by scanning binary strings
if command -v strings >/dev/null 2>&1; then
if strings -a "$dll" 2>/dev/null | grep -qiE '(^|/)nunit\.framework|xunit|mstest\.testframework'; then
echo "$base.dll" >> "$out_file"
echo " ✓ $base.dll"
found=$((found+1))
fi
else
if grep -a -qiE 'nunit\.framework|xunit|mstest\.testframework' "$dll"; then
echo "$base.dll" >> "$out_file"
echo " ✓ $base.dll"
found=$((found+1))
fi
fi
done

if [ "$found" -eq 0 ]; then
echo "✗ No test DLLs found in $tests_dir"
exit 1
fi

echo "✓ Wrote $found test DLL name(s) to $out_file"

- name: Upload Tests artifact
uses: actions/upload-artifact@v4
with:
name: Tests
path: |
_Tests_/
StartupHook/*.dll
retention-days: 30
Loading