Skip to content

Commit cb3fa8f

Browse files
authored
Merge pull request #1571 from bUnit-dev/release/v1.32
Release of new minor version v1.32
2 parents f8674d7 + 1fb99ac commit cb3fa8f

File tree

59 files changed

+721
-581
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+721
-581
lines changed

.config/dotnet-tools.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,22 @@
66
"version": "1.10.175",
77
"commands": [
88
"dotnet-serve"
9-
]
9+
],
10+
"rollForward": false
1011
},
1112
"docfx": {
1213
"version": "2.76.0",
1314
"commands": [
1415
"docfx"
15-
]
16+
],
17+
"rollForward": false
18+
},
19+
"dotnet-dump": {
20+
"version": "8.0.532401",
21+
"commands": [
22+
"dotnet-dump"
23+
],
24+
"rollForward": false
1625
}
1726
}
1827
}

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ dotnet_diagnostic.S112.severity = none # S112: General exceptions should never b
453453
dotnet_diagnostic.S1075.severity = suggestion # S1075: URIs should not be hardcoded
454454
dotnet_diagnostic.S1186.severity = suggestion # S1186: Methods should not be empty
455455
dotnet_diagnostic.S2292.severity = suggestion # S2292: Trivial properties should be auto-implemented
456+
dotnet_diagnostic.S3267.severity = suggestion # S3267: Convert foreach loop to LINQ query
456457
dotnet_diagnostic.S4158.severity = none # BUGGY with C#9 code - doesnt understand local methods
457458

458459
# Razor specific rules

.github/workflows/ci.yml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
5454
- name: ⚙️ Setup GIT versioning
5555
uses: dotnet/[email protected]
56+
id: nbgv
5657
with:
5758
setAllVars: true
5859

@@ -68,7 +69,7 @@ jobs:
6869
with:
6970
files: '["docs/site/*.md", "docs/**/*.md", "docs/**/*.tmpl.partial", "*.csproj", "**/*.csproj", "src/Directory.Build.props"]'
7071
env:
71-
RELEASE_VERSION: ${{ env.NBGV_SimpleVersion }}${{ env.NBGV_PrereleaseVersion }}
72+
RELEASE_VERSION: ${{ steps.nbgv.outputs.SimpleVersion }}${{ steps.nbgv.outputs.PrereleaseVersion }}
7273
RELEASE_NOTES: ${{ steps.changelog_reader.outputs.changes }}
7374

7475
# Create the NuGet package in the folder from the environment variable NuGetDirectory
@@ -136,20 +137,25 @@ jobs:
136137
8.0.x
137138
9.0.x
138139
140+
- name: ⚙️ Restore packages and tools
141+
run: |
142+
dotnet restore
143+
dotnet tool restore
144+
139145
- name: 🧪 Run unit tests
140-
run: dotnet test -c release -p:VSTestUseMSBuildOutput=false
146+
run: dotnet test -c release --no-restore
141147

142148
- name: 📛 Upload hang- and crash-dumps on test failure
143-
if: failure()
144-
uses: actions/upload-artifact@v3
149+
if: success() || failure()
150+
uses: actions/upload-artifact@v4
145151
with:
146152
if-no-files-found: ignore
147153
name: test-dumps
148154
path: |
149-
**/*hangdump.dmp
150-
**/*crashdump.dmp
155+
**/*.dmp
156+
**/*.dmp
151157
152-
validate_template:
158+
validate-template:
153159
runs-on: ubuntu-latest
154160
needs: [ create-nuget ]
155161
steps:
@@ -178,20 +184,23 @@ jobs:
178184
run: |
179185
dotnet new bunit --no-restore -o ${{ github.workspace }}/TemplateTestXunit
180186
echo '<?xml version="1.0" encoding="utf-8"?><Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"></Project>' >> ${{ github.workspace }}/TemplateTestXunit/Directory.Build.props
187+
echo '<Project><PropertyGroup><ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally></PropertyGroup></Project>' >> ${{ github.workspace }}/TemplateTestXunit/Directory.Packages.props
181188
dotnet restore ${{ github.workspace }}/TemplateTestXunit --source https://api.nuget.org/v3/index.json --source ${{ env.NUGET_DIRECTORY }}
182189
dotnet test ${{ github.workspace }}/TemplateTestXunit
183190
184191
- name: ✔ Verify NUnit template
185192
run: |
186193
dotnet new bunit --framework nunit --no-restore -o ${{ github.workspace }}/TemplateTestNunit
187194
echo '<?xml version="1.0" encoding="utf-8"?><Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"></Project>' >> ${{ github.workspace }}/TemplateTestNunit/Directory.Build.props
195+
echo '<Project><PropertyGroup><ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally></PropertyGroup></Project>' >> ${{ github.workspace }}/TemplateTestNunit/Directory.Packages.props
188196
dotnet restore ${{ github.workspace }}/TemplateTestNunit --source https://api.nuget.org/v3/index.json --source ${{ env.NUGET_DIRECTORY }}
189197
dotnet test ${{ github.workspace }}/TemplateTestNunit
190198
191199
- name: ✔ Verify MSTest template
192200
run: |
193201
dotnet new bunit --framework mstest --no-restore -o ${{ github.workspace }}/TemplateTestMstest
194202
echo '<?xml version="1.0" encoding="utf-8"?><Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"></Project>' >> ${{ github.workspace }}/TemplateTestMstest/Directory.Build.props
203+
echo '<Project><PropertyGroup><ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally></PropertyGroup></Project>' >> ${{ github.workspace }}/TemplateTestMstest/Directory.Packages.props
195204
dotnet restore ${{ github.workspace }}/TemplateTestMstest --source https://api.nuget.org/v3/index.json --source ${{ env.NUGET_DIRECTORY }}
196205
dotnet test ${{ github.workspace }}/TemplateTestMstest
197206
@@ -216,15 +225,23 @@ jobs:
216225
217226
- name: ⚙️ Setup GIT versioning
218227
uses: dotnet/[email protected]
228+
id: nbgv
219229
with:
220230
setAllVars: true
221231

232+
- name: 🛠️ Get Changelog Entry
233+
id: changelog_reader
234+
uses: mindsers/changelog-reader-action@v2
235+
with:
236+
version: Unreleased
237+
path: ./CHANGELOG.md
238+
222239
- name: 🍥 Replace tokens in files
223240
uses: cschleiden/replace-tokens@v1
224241
with:
225242
files: '["docs/site/*.md", "docs/**/*.md", "docs/**/*.tmpl.partial", "*.csproj", "**/*.csproj", "src/Directory.Build.props", "docs/site/docfx.json"]'
226243
env:
227-
RELEASE_VERSION: ${{ env.NBGV_SimpleVersion }}${{ env.NBGV_PrereleaseVersion }}
244+
RELEASE_VERSION: ${{ steps.nbgv.outputs.SimpleVersion }}${{ steps.nbgv.outputs.PrereleaseVersion }}
228245
RELEASE_NOTES: ${{ steps.changelog_reader.outputs.changes }}
229246

230247
- name: 📄 Build bUnit
@@ -254,7 +271,7 @@ jobs:
254271
release-preview:
255272
if: github.event_name == 'workflow_dispatch' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v2')
256273
runs-on: ubuntu-latest
257-
needs: [ validate-nuget, run-test, validate_template, validate-docs ]
274+
needs: [ validate-nuget, run-test, validate-template, validate-docs ]
258275
steps:
259276
- uses: actions/download-artifact@v4
260277
with:

.github/workflows/docs-deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
5252
- name: ⚙️ Setup GIT versioning
5353
uses: dotnet/[email protected]
54+
id: nbgv
5455
with:
5556
setAllVars: true
5657

@@ -60,10 +61,10 @@ jobs:
6061
with:
6162
path: ./CHANGELOG.md
6263

63-
- name: 🛠️ Update tokens in project files
64+
- name: 🛠️ Update tokens in files
6465
uses: cschleiden/replace-tokens@v1
6566
with:
66-
files: '["docs/site/*.md", "docs/**/*.md", "docs/**/*.tmpl.partial", "*.csproj", "**/*.csproj", "src/Directory.Build.props"]'
67+
files: '["docs/site/*.md", "docs/**/*.md", "docs/**/docfx.json", "*.csproj", "**/*.csproj", "src/Directory.Build.props"]'
6768
env:
6869
RELEASE_VERSION: ${{ steps.changelog_reader.outputs.version }}
6970
RELEASE_NOTES: ${{ steps.changelog_reader.outputs.changes }}
@@ -123,9 +124,8 @@ jobs:
123124
- name: ⏭ Create pull request from stable to main when direct merge fails
124125
if: steps.mergeMainline.outcome == 'failure'
125126
uses: thomaseizinger/[email protected]
126-
env:
127-
GITHUB_TOKEN: ${{ secrets.BUNIT_BOT_TOKEN }}
128127
with:
128+
github_token: ${{ secrets.BUNIT_BOT_TOKEN }}
129129
head: stable
130130
base: main
131131
title: Update main with documentation in stable

.github/workflows/prepare-release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ jobs:
2828
version: Unreleased
2929
path: ./CHANGELOG.md
3030

31+
- name: ⚙️ Setup GIT versioning
32+
uses: dotnet/[email protected]
33+
id: nbgv
34+
with:
35+
setAllVars: true
36+
3137
- name: ☑ Check that release contains changes
3238
if: steps.changelog_reader.outputs.changes == ''
3339
run: |
@@ -85,12 +91,11 @@ jobs:
8591

8692
- name: ⏭ Create pull request for release branch
8793
uses: thomaseizinger/[email protected]
88-
env:
89-
GITHUB_TOKEN: ${{ secrets.BUNIT_BOT_TOKEN }}
9094
with:
91-
head: release/v${{ env.NBGV_MajorMinorVersion }}
95+
github_token: ${{ secrets.BUNIT_BOT_TOKEN }}
96+
head: release/v${{ steps.nbgv.outputs.MajorMinorVersion }}
9297
base: stable
93-
title: Release of new ${{ github.event.inputs.versionIncrement }} version v${{ env.NBGV_MajorMinorVersion }}
98+
title: Release of new ${{ github.event.inputs.versionIncrement }} version v${{ steps.nbgv.outputs.MajorMinorVersion }}
9499
body: |
95100
This PR was created in response to a manual trigger of the [prepare-release workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}).
96101

.github/workflows/rebase-v2-on-main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ jobs:
4848
- name: ⏭ Create pull request
4949
if: steps.rebaseV2.outcome == 'failure'
5050
uses: thomaseizinger/[email protected]
51-
env:
52-
GITHUB_TOKEN: ${{ secrets.BUNIT_BOT_TOKEN }}
5351
with:
52+
github_token: ${{ secrets.BUNIT_BOT_TOKEN }}
5453
head: main
5554
base: v2
5655
title: Rebase v2 on main

.github/workflows/release.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
5151
- name: ⚙️ Setup GIT versioning
5252
uses: dotnet/[email protected]
53+
id: nbgv
5354
with:
5455
setAllVars: true
5556

@@ -67,7 +68,7 @@ jobs:
6768
- name: 🛠️ Update changelog
6869
uses: thomaseizinger/[email protected]
6970
with:
70-
version: ${{ env.NBGV_SemVer2 }}
71+
version: ${{ steps.nbgv.outputs.SemVer2 }}
7172

7273
- name: 🛠️ Update changelog compare URLs
7374
shell: bash
@@ -78,22 +79,22 @@ jobs:
7879
- name: 🛠️ Commit CHANGELOG.md to stable branch
7980
run: |
8081
git add CHANGELOG.md
81-
git commit -S -m "Updated CHANGELOG.md for ${{ env.NBGV_SimpleVersion }} release"
82+
git commit -S -m "Updated CHANGELOG.md for ${{ steps.nbgv.outputs.SimpleVersion }} release"
8283
echo "RELEASE_COMMIT_HASH=$(git rev-parse stable)" >> $GITHUB_ENV
8384
8485
- name: 🛠️ Get Changelog Entry
8586
id: changelog_reader
8687
uses: mindsers/changelog-reader-action@v2
8788
with:
88-
version: ${{ env.NBGV_SemVer2 }}
89+
version: ${{ steps.nbgv.outputs.SemVer2 }}
8990
path: ./CHANGELOG.md
9091

9192
- name: 🛠️ Update tokens in project files
9293
uses: cschleiden/replace-tokens@v1
9394
with:
9495
files: '["docs/site/*.md", "docs/**/*.md", "docs/**/*.tmpl.partial", "*.csproj", "**/*.csproj", "src/Directory.Build.props"]'
9596
env:
96-
RELEASE_VERSION: ${{ env.NBGV_NuGetPackageVersion }}
97+
RELEASE_VERSION: ${{ steps.nbgv.outputs.NuGetPackageVersion }}
9798
RELEASE_NOTES: ${{ steps.changelog_reader.outputs.changes }}
9899

99100
- name: 🛠️ Packing library in release mode
@@ -111,16 +112,15 @@ jobs:
111112
run: git push origin stable
112113

113114
- name: 🛠️ Create GitHub release
114-
uses: thomaseizinger/[email protected]
115-
env:
116-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115+
uses: thomaseizinger/[email protected]
117116
with:
118-
tag_name: v${{ env.NBGV_SemVer2 }}
117+
tag_name: v${{ steps.nbgv.outputs.SemVer2 }}
119118
target_commitish: ${{ env.RELEASE_COMMIT_HASH }}
120-
name: ${{ env.NBGV_SemVer2 }}
119+
name: ${{ steps.nbgv.outputs.SemVer2 }}
121120
body: ${{ steps.changelog_reader.outputs.changes }}
122121
draft: false
123-
prerelease: ${{ env.NBGV_PublicRelease == 'False' }}
122+
prerelease: ${{ steps.nbgv.outputs.PublicRelease == 'False' }}
123+
github_token: ${{ secrets.GITHUB_TOKEN }}
124124

125125
- name: ⏩ Merge stable with main, push to origin
126126
id: mergeMainline
@@ -133,12 +133,11 @@ jobs:
133133
- name: ⏭ Create pull request from stable to main when direct merge fails
134134
if: steps.mergeMainline.outcome == 'failure'
135135
uses: thomaseizinger/[email protected]
136-
env:
137-
GITHUB_TOKEN: ${{ secrets.BUNIT_BOT_TOKEN }}
138136
with:
137+
github_token: ${{ secrets.BUNIT_BOT_TOKEN }}
139138
head: stable
140139
base: main
141-
title: Update main with changes in stable after v${{ env.NBGV_SemVer2 }} release
140+
title: Update main with changes in stable after v${{ steps.nbgv.outputs.SemVer2 }} release
142141
reviewers: ${{ github.actor }} # By default, we request a review from the person who triggered the workflow.
143142
body: |
144143
Hi @${{ github.actor }}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ All notable changes to **bUnit** will be documented in this file. The project ad
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- Ensure that a check in `WaitForAssertion` and related methods is always performed at once before the wait timer is started. If not, the timeout could occure before a wait-for check-condition had been attempted, causing tests to fail without reason. Fixed by [@egil](https://github.com/egil).
12+
913
## [1.31.3] - 2024-08-16
1014

1115
### Fixed

Directory.Build.props

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

4-
<PropertyGroup Label="Configuration variables">
5-
<DotNet3Version>3.1.*</DotNet3Version>
6-
<DotNet5Version>5.0.*</DotNet5Version>
7-
<DotNet6Version>6.0.*</DotNet6Version>
8-
<DotNet7Version>7.0.*</DotNet7Version>
9-
<DotNet8Version>8.0.*</DotNet8Version>
10-
<DotNet9Version>9.0.0-*</DotNet9Version>
11-
</PropertyGroup>
12-
134
<!-- Solution wide properties -->
145
<PropertyGroup Label="Assembly Naming">
156
<Company>Egil Hansen</Company>
@@ -49,14 +40,7 @@
4940
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
5041
</PropertyGroup>
5142

52-
<!-- Shared code analyzers used for all projects in the solution -->
53-
<ItemGroup Label="Code Analyzers">
54-
<PackageReference Include="AsyncFixer" Version="1.6.0" PrivateAssets="All" />
55-
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.32.0.97167" PrivateAssets="All" />
56-
</ItemGroup>
57-
58-
<ItemGroup Label="Implicit usings"
59-
Condition="$(MSBuildProjectName) != 'bunit.template' AND $(MSBuildProjectName) != 'bunit' AND $(MSBuildProjectName) != 'AngleSharpWrappers.Tests'">
43+
<ItemGroup Label="Implicit usings" Condition="$(MSBuildProjectName) != 'bunit.template' AND $(MSBuildProjectName) != 'bunit' AND $(MSBuildProjectName) != 'bunit.generators'">
6044
<Using Include="Microsoft.AspNetCore.Components" />
6145
<Using Include="Microsoft.AspNetCore.Components.RenderTree" />
6246
<Using Include="Microsoft.AspNetCore.Components.Rendering" />

0 commit comments

Comments
 (0)