Skip to content

Commit 9c395bc

Browse files
authored
Merge pull request #697 from bUnit-dev/release/v1.7
Release of new minor version v1.7
2 parents 3970922 + 680ec77 commit 9c395bc

File tree

52 files changed

+803
-180
lines changed

Some content is hidden

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

52 files changed

+803
-180
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ dotnet_diagnostic.BL0003.severity = none
463463
dotnet_diagnostic.BL0004.severity = none
464464
dotnet_diagnostic.BL0005.severity = none
465465
dotnet_diagnostic.BL0006.severity = none
466+
dotnet_diagnostic.BL0007.severity = none
466467

467468
##########################################
468469
# Custom Test Code Analyzers Rules

.github/nightly-failed.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Verification against .NET 7 nightly failed
3+
labels: input needed
4+
---
5+
6+
The nightly build failed against the nightly .NET 7 SDK. Please investigate.
7+
8+
## Additional information
9+
10+
`dotnet --version`: `{{env.DOTNET_VERSION}}`

.github/workflows/docs-deploy.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,20 @@ jobs:
6060
with:
6161
files: '["docs/site/*.md", "docs/**/*.md", "docs/**/*.tmpl.partial", "*.csproj", "**/*.csproj"]'
6262

63-
- name: ⚙️ Setup dotnet 3.1.x
64-
uses: actions/setup-dotnet@v1
63+
- name: ⚙️ Setup dotnet versions
64+
uses: actions/setup-dotnet@v2
6565
with:
66-
dotnet-version: '3.1.x'
67-
68-
- name: ⚙️ Setup dotnet 5.0.x
69-
uses: actions/setup-dotnet@v1
70-
with:
71-
dotnet-version: '5.0.x'
72-
73-
- name: ⚙️ Setup dotnet 6.0.x
74-
uses: actions/setup-dotnet@v1
75-
with:
76-
dotnet-version: 6.0.x
66+
dotnet-version: |
67+
3.1.x
68+
5.0.x
69+
6.0.x
70+
7.0.x
71+
include-prerelease: true
72+
73+
- name: 🎨 Setup color
74+
run: |
75+
echo "DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION=1" >> $GITHUB_ENV
76+
echo "TERM=xterm" >> $GITHUB_ENV
7777
7878
- name: 🛠️ Building bUnit
7979
run: dotnet build /p:PublicRelease=true

.github/workflows/release-preview.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,20 @@ jobs:
2828
- name: ⚙️ Setup GIT versioning
2929
uses: dotnet/[email protected]
3030

31-
- name: ⚙️ Setup dotnet 5.0.x
32-
uses: actions/setup-dotnet@v1
31+
- name: ⚙️ Setup dotnet versions
32+
uses: actions/setup-dotnet@v2
3333
with:
34-
dotnet-version: '5.0.x'
35-
36-
- name: ⚙️ Setup dotnet 6.0.x
37-
uses: actions/setup-dotnet@v1
38-
with:
39-
dotnet-version: 6.0.x
34+
dotnet-version: |
35+
3.1.x
36+
5.0.x
37+
6.0.x
38+
7.0.x
39+
include-prerelease: true
40+
41+
- name: 🎨 Setup color
42+
run: |
43+
echo "DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION=1" >> $GITHUB_ENV
44+
echo "TERM=xterm" >> $GITHUB_ENV
4045
4146
- name: 🛠️ Update tokens in project files
4247
uses: cschleiden/replace-tokens@v1
@@ -50,8 +55,8 @@ jobs:
5055
dotnet pack src/bunit.template/ -c Release -o ${GITHUB_WORKSPACE}/packages -p:ContinuousIntegrationBuild=true -p:publicrelease=true
5156
5257
- name: 🛠️ Upload library to GitHub Package Repository
53-
run: dotnet nuget push ${GITHUB_WORKSPACE}/packages/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/bunit-dev/index.json --skip-duplicate --no-symbols true
58+
run: dotnet nuget push ${GITHUB_WORKSPACE}/packages/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/bunit-dev/index.json --skip-duplicate --no-symbols
5459

5560
- name: 🛠️ Upload library to NuGet.org repository
5661
if: github.event.inputs.nugetRelease == 'true'
57-
run: dotnet nuget push ${GITHUB_WORKSPACE}/packages/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols true
62+
run: dotnet nuget push ${GITHUB_WORKSPACE}/packages/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ jobs:
5959
with:
6060
setAllVars: true
6161

62-
- name: ⚙️ Setup dotnet 5.0.x
63-
uses: actions/setup-dotnet@v1
62+
- name: ⚙️ Setup dotnet versions
63+
uses: actions/setup-dotnet@v2
6464
with:
65-
dotnet-version: '5.0.x'
66-
67-
- name: ⚙️ Setup dotnet 6.0.x
68-
uses: actions/setup-dotnet@v1
69-
with:
70-
dotnet-version: 6.0.x
65+
dotnet-version: |
66+
3.1.x
67+
5.0.x
68+
6.0.x
69+
7.0.x
70+
include-prerelease: true
7171

7272
- name: 🛠️ Update changelog
7373
uses: thomaseizinger/[email protected]
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: verification-dotnet-nightly
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
verify-bunit:
10+
name: 👌 Verify bUnit
11+
runs-on: ubuntu-latest
12+
container:
13+
image: mcr.microsoft.com/dotnet/nightly/sdk:7.0
14+
15+
steps:
16+
- name: 🌛 Show dotnet version
17+
run: |
18+
dotnet --info
19+
20+
- name: 🛒 Checkout repository
21+
uses: actions/checkout@v2
22+
with:
23+
fetch-depth: 0
24+
25+
- name: 🎨 Setup color
26+
run: |
27+
echo "DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION=1" >> $GITHUB_ENV
28+
echo "TERM=xterm" >> $GITHUB_ENV
29+
30+
- name: 📦 Setup nuget nightly builds
31+
run: |
32+
dotnet restore --verbosity normal -s https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json -s https://api.nuget.org/v3/index.json
33+
34+
- name: 🧪 Run unit tests
35+
run: |
36+
dotnet test ./tests/bunit.core.tests/bunit.core.tests.csproj -c release --no-restore -f net7.0 --logger:"console;verbosity=normal" --blame-hang --blame-hang-timeout 1m --blame-hang-dump-type none
37+
dotnet test ./tests/bunit.web.tests/bunit.web.tests.csproj -c release --no-restore -f net7.0 --logger:"console;verbosity=normal" --blame-hang --blame-hang-timeout 1m --blame-hang-dump-type none
38+
dotnet test ./tests/bunit.web.testcomponents.tests/bunit.web.testcomponents.tests.csproj -c release --no-restore -f net7.0 --logger:"console;verbosity=normal" --blame-hang --blame-hang-timeout 1m --blame-hang-dump-type none
39+
40+
- name: 🧾 Collect dotnet information
41+
if: failure()
42+
run: |
43+
echo "DOTNET_VERSION=$(dotnet --version)" >> $GITHUB_ENV
44+
echo $DOTNET_VERSION
45+
46+
- name: ⚡ Create issue if failed
47+
if: failure()
48+
uses: JasonEtco/create-an-issue@v2
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
ADJECTIVE: DOTNET_VERSION
52+
with:
53+
filename: .github/nightly-failed.md
54+
update_existing: true

.github/workflows/verification.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ jobs:
3131
with:
3232
fetch-depth: 0
3333

34-
- name: ⚙️ Setup dotnet 3.1.x
35-
uses: actions/setup-dotnet@v1
34+
- name: ⚙️ Setup dotnet versions
35+
uses: actions/setup-dotnet@v2
3636
with:
37-
dotnet-version: '3.1.x'
38-
39-
- name: ⚙️ Setup dotnet 5.0.x
40-
uses: actions/setup-dotnet@v1
41-
with:
42-
dotnet-version: '5.0.x'
43-
44-
- name: ⚙️ Setup dotnet 6.0.x
45-
uses: actions/setup-dotnet@v1
46-
with:
47-
dotnet-version: 6.0.x
37+
dotnet-version: |
38+
3.1.x
39+
5.0.x
40+
6.0.x
41+
7.0.x
42+
include-prerelease: true
43+
44+
- name: 🎨 Setup color
45+
run: |
46+
echo "DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION=1" >> $GITHUB_ENV
47+
echo "TERM=xterm" >> $GITHUB_ENV
4848
4949
- name: ⚙️ Setup GIT versioning
5050
uses: dotnet/[email protected]
@@ -63,9 +63,9 @@ jobs:
6363

6464
- name: 🧪 Run unit tests
6565
run: |
66-
dotnet test ./tests/bunit.core.tests/bunit.core.tests.csproj -c release --logger GitHubActions --blame-hang --blame-hang-timeout 1m --blame-hang-dump-type none
67-
dotnet test ./tests/bunit.web.tests/bunit.web.tests.csproj -c release --logger GitHubActions --blame-hang --blame-hang-timeout 1m --blame-hang-dump-type none
68-
dotnet test ./tests/bunit.web.testcomponents.tests/bunit.web.testcomponents.tests.csproj -c release --logger GitHubActions --blame-hang --blame-hang-timeout 1m --blame-hang-dump-type none
66+
dotnet test ./tests/bunit.core.tests/bunit.core.tests.csproj -c release --logger:"console;verbosity=normal" --blame-hang --blame-hang-timeout 1m --blame-hang-dump-type none
67+
dotnet test ./tests/bunit.web.tests/bunit.web.tests.csproj -c release --logger:"console;verbosity=normal" --blame-hang --blame-hang-timeout 1m --blame-hang-dump-type none
68+
dotnet test ./tests/bunit.web.testcomponents.tests/bunit.web.testcomponents.tests.csproj -c release --logger:"console;verbosity=normal" --blame-hang --blame-hang-timeout 1m --blame-hang-dump-type none
6969
7070
- name: 🗳️ Pack library
7171
run: |

CHANGELOG.md

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

77
## [Unreleased]
88

9+
### Added
10+
11+
- Added method `SetAuthenticationType` to `TestAuthorizationContext` to allow for custom authentication type checks. By [@TimPurdum](https://github.com/timpurdum).
12+
13+
- Added `DisposeComponents` to `TestContextBase`. It will dispose and remove all components rendered by the `TestContextBase`. By [@linkdotnet](https://github.com/linkdotnet).
14+
15+
- Added .NET 7 as a target framework for bUnit. By [@linkdotnet](https://github.com/linkdotnet).
16+
17+
### Fixed
18+
19+
- Fixed step by step guide for building and viewing the documentation locally. By [@linkdotnet](https://github.com/linkdotnet).
20+
21+
- `FakeNavigationManager.NavigateTo` could lead to exceptions when navigating to external url's. Reported by (@TDroogers)[https://github.com/TDroogers]. Fixed by [@linkdotnet](https://github.com/linkdotnet).
22+
923
## [1.6.4] - 2022-02-22
1024

1125
A quick minor release that primiarily fixes a regression in 1.5.12.

Directory.Build.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<DotNet3Version>3.1.22</DotNet3Version>
66
<DotNet5Version>5.0.0</DotNet5Version>
77
<DotNet6Version>6.0.0</DotNet6Version>
8+
<DotNet7Version>7.0.0-*</DotNet7Version>
89
</PropertyGroup>
910

1011
<!-- Solution wide properties -->
@@ -47,8 +48,8 @@
4748
<!-- Shared code analyzers used for all projects in the solution -->
4849
<ItemGroup Label="Code Analyzers">
4950
<PackageReference Include="AsyncFixer" Version="1.5.1" PrivateAssets="All" />
50-
<PackageReference Include="Meziantou.Analyzer" Version="1.0.695" PrivateAssets="All" />
51-
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.35.0.42613" PrivateAssets="All" />
51+
<PackageReference Include="Meziantou.Analyzer" Version="1.0.701" PrivateAssets="All" />
52+
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.38.0.46746" PrivateAssets="All" />
5253
</ItemGroup>
5354

5455
<ItemGroup Label="Implicit usings" Condition="$(MSBuildProjectName) != 'bunit.template' AND $(MSBuildProjectName) != 'bunit'">

docs/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,19 @@ These sample components, source files, and tests source files are included in th
1818

1919
## Building and Viewing Docs Locally
2020

21-
To build and view the documentation locally, follow these steps:
21+
The following chapter describes how you can run and view the documentation locally
22+
23+
### Requirements
24+
You will need the following tools installed:
25+
* The [`dotnet serve` tool](https://github.com/natemcmaster/dotnet-serve)
26+
* [DocFx](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html#2-use-docfx-as-a-command-line-tool) to generate the html files
27+
28+
### View the documentation
2229

2330
1. From `docs/site` run `dotnet build`. If you get warnings from running `dotnet build`, try running it again.
24-
2. From `docs/` run `serve-docs.cmd`. This will start up a local web server, hosting the generated documentation site on http://localhost:8080, using the [`dotnet serve` tool](https://github.com/natemcmaster/dotnet-serve).
25-
3. After changing samples from `docs/samples`, run `dotnet test`. This will compile the sample components and run the sample tests.
31+
2. From `docs/` run `docfx`. This will generate all the html site based on the markdown files.
32+
3. From `docs/` run `serve-docs.cmd`. This will start up a local web server, hosting the generated documentation site.
33+
4. After changing samples from `docs/samples`, run `dotnet test`. This will compile the sample components and run the sample tests.
2634

2735
## Documentation Writing Rules
2836

0 commit comments

Comments
 (0)