Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved locking performance on .NET 9.0+ #685

Open
wants to merge 238 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
238 commits
Select commit Hold shift + click to select a range
d828729
Package updates
webprofusion-chrisc May 15, 2023
9ef5a7d
API: add health endpoint and service config from ENV
webprofusion-chrisc May 17, 2023
dca8fac
Package updates and move some components to net8.0
webprofusion-chrisc May 19, 2023
97fd3ae
cleanup
webprofusion-chrisc May 19, 2023
28bb55a
Adjust default launch settings
webprofusion-chrisc May 19, 2023
7a37fc3
Package updates
webprofusion-chrisc May 25, 2023
85d56b2
Reduce size of API in use
webprofusion-chrisc May 25, 2023
bb52af7
Package updates
webprofusion-chrisc May 30, 2023
89dfed3
Cleanup
webprofusion-chrisc Jun 1, 2023
686a6be
API: update endpoints and implement credential update
webprofusion-chrisc Jun 1, 2023
3096655
Core: Enable powershell on linux
webprofusion-chrisc Jun 1, 2023
eab0ede
API: implement dns zone lookup
webprofusion-chrisc Jun 8, 2023
400891b
Package updates
webprofusion-chrisc Jun 15, 2023
f32c1df
Minor updates
webprofusion-chrisc Jun 19, 2023
d040edf
Update readme
webprofusion-chrisc Jun 19, 2023
5f66afb
Implement paged result set with count for managed cert search
webprofusion-chrisc Jun 28, 2023
0ad4cd5
Package updates
webprofusion-chrisc Jun 28, 2023
ccf4886
WIP: pref for powershell executable path
webprofusion-chrisc Jun 30, 2023
c329320
API: add health endpoint and service config from ENV
webprofusion-chrisc May 17, 2023
7489345
Package updates and move some components to net8.0
webprofusion-chrisc May 19, 2023
f2e179d
Cleanup
webprofusion-chrisc Jun 1, 2023
9e84073
Package updates
webprofusion-chrisc Jun 15, 2023
3c3170a
Package updates
webprofusion-chrisc Jun 16, 2023
ad92710
Implement paged result set with count for managed cert search
webprofusion-chrisc Jun 28, 2023
27129b4
Package updates
webprofusion-chrisc Jul 31, 2023
ed83c16
Implement Log parsing
webprofusion-chrisc Aug 2, 2023
719a0c0
Core: implement page results
webprofusion-chrisc Aug 4, 2023
7348840
Update Db tests for item count
webprofusion-chrisc Aug 4, 2023
69740dc
Package updates
webprofusion-chrisc Aug 7, 2023
cb128aa
Update build version
webprofusion-chrisc Aug 17, 2023
98b0fe2
Move job timers into main CertifyManager instead of firing from service
webprofusion-chrisc Aug 17, 2023
10a959f
Worker service updates
webprofusion-chrisc Aug 17, 2023
211818f
Import/Export: optionally skip deployment
webprofusion-chrisc Aug 17, 2023
a6d6f0f
Server connection: update UI
webprofusion-chrisc Aug 17, 2023
c707904
Data Stores: show the current default store
webprofusion-chrisc Aug 17, 2023
78531ff
Import: show option to skip deployment
webprofusion-chrisc Aug 17, 2023
68cad14
Sync service controller endpoints
webprofusion-chrisc Aug 17, 2023
ad05230
Core: Implement renewal attempt result ordering
webprofusion-chrisc Aug 19, 2023
990ba31
Cleanup
webprofusion-chrisc Aug 19, 2023
3f85283
WIP: paged managed cert list
webprofusion-chrisc Aug 21, 2023
75d8b1a
Core: remove unused request status check
webprofusion-chrisc Aug 21, 2023
13738f7
Core: refactor renewal manager for batched querying
webprofusion-chrisc Aug 21, 2023
3f186a2
Cleanup
webprofusion-chrisc Aug 22, 2023
de12aa6
Package updates
webprofusion-chrisc Aug 22, 2023
996b508
Cleanup
webprofusion-chrisc Aug 22, 2023
92870ce
U/Core: implement summary query instead of counting all managed certs…
webprofusion-chrisc Aug 26, 2023
1d11fcb
Cleanup
webprofusion-chrisc Aug 31, 2023
ce0d4ec
Update reporting namespace
webprofusion-chrisc Sep 1, 2023
27bc8ba
Package updates
webprofusion-chrisc Sep 5, 2023
8660478
UI: Implement result paging and XAML cleanup
webprofusion-chrisc Sep 7, 2023
1b14021
Package updates
webprofusion-chrisc Sep 12, 2023
e54a2a0
Dashboard summary fix
webprofusion-chrisc Sep 12, 2023
322e539
WIP: text filter refresh results
webprofusion-chrisc Sep 12, 2023
5058d09
Access Control: WIP implement RBAC and storage
webprofusion-chrisc Sep 22, 2023
cb4a539
Cleanup
webprofusion-chrisc Sep 22, 2023
1b370e3
Package updates
webprofusion-chrisc Sep 22, 2023
fe25cab
Package updates
webprofusion-chrisc Oct 4, 2023
a7064f1
Package updates (.net 8 rc2 etc)
webprofusion-chrisc Oct 13, 2023
4bfda09
Fix to Debug Port of Public.API always being overwritten by servers.json
jrnelson90 Oct 14, 2023
cd5ddfc
WIP: scaffold access control Api
webprofusion-chrisc Oct 16, 2023
3825b97
Package updates
webprofusion-chrisc Oct 18, 2023
9941479
Cleanup
webprofusion-chrisc Oct 18, 2023
5a569c7
Access Control: implement user/role api and bootstrap of basic access…
webprofusion-chrisc Oct 18, 2023
f981279
Created basic unit tests for the Loggy class in Certify.Shared.Core
jrnelson90 Oct 19, 2023
36c90af
DNS: add experimental dns provider caching
webprofusion-chrisc Oct 20, 2023
e7d8214
Simplify SelectCAWithFailover based on GetAccountsWithRequiredCAFeatures
jrnelson90 Oct 20, 2023
a520490
Add regular GC sweep
webprofusion-chrisc Oct 25, 2023
c9c6346
Package updates
webprofusion-chrisc Oct 25, 2023
0238bca
Implement challenge cleanup action by repurposing challenge test cleanup
webprofusion-chrisc Oct 26, 2023
55a89e7
Updates and expansions to various tests
jrnelson90 Oct 26, 2023
3346e83
Update docker related settings for service worker.
webprofusion-chrisc Oct 30, 2023
f45d6a2
Update notes for docker
webprofusion-chrisc Oct 30, 2023
5fd625b
Added 31 new unit tests for methods in CertifyManage.Account
jrnelson90 Oct 31, 2023
4d1c8b5
Automated code cleanup
webprofusion-chrisc Nov 2, 2023
7f0ef51
Added Integration Tests for CertifyManager.ServerType partial class
jrnelson90 Nov 2, 2023
820eecf
Settings > Certificate Authorities, convert some text to resources
webprofusion-chrisc Nov 3, 2023
2793911
Added new Unit tests for methods in CertifyManager.cs
jrnelson90 Nov 3, 2023
51868ec
Refactored TestCertifyManagerGetACMEProvider, moved to integration tests
jrnelson90 Nov 3, 2023
695f585
UI: add/convert more string resources
webprofusion-chrisc Nov 7, 2023
77bf8ce
Make CA controller partial for extending with source generators
webprofusion-chrisc Nov 7, 2023
accb35d
Core: update to error messages when saving ca or account
webprofusion-chrisc Nov 9, 2023
8cdd3af
Package updates
webprofusion-chrisc Nov 9, 2023
c3a72e8
Docker: update debug config and allow write to app settings for non-p…
webprofusion-chrisc Nov 9, 2023
5a9fa88
Add public API to service solution
webprofusion-chrisc Nov 9, 2023
0dec563
Fix migration and public API namespaces
webprofusion-chrisc Nov 10, 2023
0f22e70
UI: use resource for string in import/export
webprofusion-chrisc Nov 14, 2023
86c6fe3
Package updates
webprofusion-chrisc Nov 15, 2023
c3c4eec
aspire experiment
webprofusion-chrisc Nov 16, 2023
8df5464
Fixes for build/untime errors
webprofusion-chrisc Nov 16, 2023
68aa9a0
Cleanup app startup
webprofusion-chrisc Nov 16, 2023
497d5fb
Fixing file paths for tests running in Linux containers/envs
jrnelson90 Nov 30, 2023
e734e6f
Package updates
webprofusion-chrisc Dec 11, 2023
633d819
Core: implement queue for batch submission of status reports
webprofusion-chrisc Dec 12, 2023
463c2ce
Update choco scripts
webprofusion-chrisc Dec 12, 2023
99ae4af
First attempt adding testing Github Actions for Certify.Core.Tests.Unit
jrnelson90 Dec 14, 2023
38481cf
API: simplify access to health endpoint for debugging etc
webprofusion-chrisc Dec 15, 2023
12d17be
API: update service host/port from ENV depending on context
webprofusion-chrisc Dec 15, 2023
47ed950
Fix and test validation for mixed wildcards with subdomain like names
webprofusion-chrisc Dec 18, 2023
190c18d
Move unit test source into subfolder, fix running tests from VS
webprofusion-chrisc Dec 18, 2023
5ed1e2d
API: consolidate ports for various launch profiles
webprofusion-chrisc Dec 18, 2023
7fb65a4
Service Worker: consolidate ports for launch profiles
webprofusion-chrisc Dec 18, 2023
e7aaacc
Cleanup
webprofusion-chrisc Dec 19, 2023
78a72ff
Package updates
webprofusion-chrisc Dec 19, 2023
2579caf
Cleanup
webprofusion-chrisc Dec 20, 2023
e4eb13c
API: update connection handling to backend service
webprofusion-chrisc Dec 21, 2023
475e761
Service worker: fix package version exception
webprofusion-chrisc Dec 21, 2023
1069006
API: all controllers should be partial classes for extension with sou…
webprofusion-chrisc Dec 21, 2023
070a63b
Package updates
webprofusion-chrisc Dec 21, 2023
1befa47
Cleanup
webprofusion-chrisc Jan 8, 2024
3085f88
Cleanup
webprofusion-chrisc Jan 8, 2024
96ae461
Package updates
webprofusion-chrisc Jan 8, 2024
376b27c
Implement Aspire in dev and remove Certify.Service.Worker
webprofusion-chrisc Jan 8, 2024
b89e35d
API: move example client from web UI
webprofusion-chrisc Jan 8, 2024
6d968ad
Package updates
webprofusion-chrisc Jan 15, 2024
3817aaf
UI: update license action text for clarity
webprofusion-chrisc Jan 15, 2024
dd671ed
Update implementation of public API tests, fix download and version t…
webprofusion-chrisc Jan 16, 2024
68b5ad2
Package updates
webprofusion-chrisc Feb 1, 2024
8a42c0d
Security principle and access control updates
webprofusion-chrisc Feb 1, 2024
157f538
Package updates
webprofusion-chrisc Feb 1, 2024
355500a
Add/Update security principles
webprofusion-chrisc Feb 2, 2024
ca50be0
Package updates
webprofusion-chrisc Feb 5, 2024
5c306ae
API: Implement update assigned roles
webprofusion-chrisc Feb 6, 2024
c14ec8f
Package updates
webprofusion-chrisc Feb 8, 2024
18abf6f
Tasks: perform validation in preview mode
webprofusion-chrisc Feb 8, 2024
a7a0d21
API: add user auth context passed through to service during calls
webprofusion-chrisc Feb 8, 2024
9530e26
Access: add user role status query on login
webprofusion-chrisc Feb 8, 2024
eebdfaf
WIP: resource action standard naming
webprofusion-chrisc Feb 8, 2024
589fd22
Cleanup
webprofusion-chrisc Feb 8, 2024
b2a4cb1
Tests: fix access control test referencing mutated in-memory value
webprofusion-chrisc Feb 8, 2024
2aff665
Test: update check assert not null result
webprofusion-chrisc Feb 8, 2024
524f2f1
Add hosting.de as posh acme option
Scriptkiddi Jan 31, 2024
106eb9e
Renewal: Port fix for recurring renewal attempts which should be on …
webprofusion-chrisc Feb 8, 2024
b112b74
UI/service: SignalR breaks if BCL Async version wrong
webprofusion-chrisc Feb 9, 2024
2514ae2
Move API method source generators into main repo
webprofusion-chrisc Feb 15, 2024
f30db54
Cleanup warnings
webprofusion-chrisc Feb 15, 2024
21e6f4e
Aspire: update references
webprofusion-chrisc Feb 16, 2024
49efe5e
Remove nuget package builds
webprofusion-chrisc Feb 16, 2024
e6a91c7
Cleanup type and platform warnings
webprofusion-chrisc Feb 16, 2024
a42b541
Credentials: use default data protection scope and cleanup platform s…
webprofusion-chrisc Feb 16, 2024
d7228d5
Core: add data protector service
webprofusion-chrisc Feb 16, 2024
ffdcd8e
Package updates
webprofusion-chrisc Feb 19, 2024
bd358fd
Tests: Fix access control object mutation during test
webprofusion-chrisc Feb 19, 2024
b7a592e
Test: clean up unused configuration
webprofusion-chrisc Feb 19, 2024
b43bca4
Update self signed cert generation/storage and tests
webprofusion-chrisc Feb 19, 2024
3385e65
Update cert operation tests for private key path checks
webprofusion-chrisc Feb 19, 2024
06c51b8
Remove deprecated use of CertID for OCSP etc
webprofusion-chrisc Feb 19, 2024
4c6c7a2
Access control: standard roles, policies, resource actions, cleanup
webprofusion-chrisc Feb 21, 2024
4dbb2fa
Access control: fix tests
webprofusion-chrisc Feb 21, 2024
0fdceac
Package updates
webprofusion-chrisc Feb 21, 2024
db0a8f4
DNS: Add PowerDNS provider viA Posh-ACME
webprofusion-chrisc Feb 21, 2024
554a97f
Test: skip key path tests on non-windows
webprofusion-chrisc Feb 21, 2024
085e186
Cleanup
webprofusion-chrisc Feb 21, 2024
c0ff7fc
Powershell: only attempt credentials on Windows currently
webprofusion-chrisc Feb 21, 2024
d76cd62
API: use user_id as jwt claim, enable caching
webprofusion-chrisc Feb 21, 2024
8cb5c4d
Standardise app data folder path creation/retrieval
webprofusion-chrisc Feb 22, 2024
5e4e303
Update common app data path creation
webprofusion-chrisc Feb 26, 2024
34095c5
Core: apply default app data ACL on create
webprofusion-chrisc Feb 26, 2024
c35a4c1
Fix tests 462
webprofusion-chrisc Feb 26, 2024
ad5ec64
Fix log level for access control
webprofusion-chrisc Feb 26, 2024
760357a
Fix tests
webprofusion-chrisc Feb 26, 2024
70d5124
Docker: update step-ca to use less layers in build
webprofusion-chrisc Feb 26, 2024
3063cf3
Cleanup
webprofusion-chrisc Feb 28, 2024
9929ef7
Tests: implement key acl tests
webprofusion-chrisc Feb 28, 2024
490a0e8
Package updates
webprofusion-chrisc Mar 12, 2024
f209947
Renewal targets: skip if item not found
webprofusion-chrisc Mar 12, 2024
321eccf
Package updates
webprofusion-chrisc Mar 18, 2024
bf8c158
Cleanup
webprofusion-chrisc Mar 18, 2024
1019989
UI: skip cache update for external items, skip validation if item not…
webprofusion-chrisc Mar 26, 2024
7e087e6
Package updates
webprofusion-chrisc Mar 26, 2024
403ce22
Update build props
webprofusion-chrisc Mar 26, 2024
0aaf5a9
WIP: include external items in results
webprofusion-chrisc Mar 26, 2024
5eb2c18
Package updates
webprofusion-chrisc Apr 18, 2024
65c432f
API client: configure await to allow for WPF dispatcher on async loads
webprofusion-chrisc Apr 18, 2024
bb6ed77
Anvil: chain build - fallback to skipping chain build if no issuers k…
webprofusion-chrisc May 1, 2024
430e55f
ARI: update CertID computation. Remove older draft of Update method
webprofusion-chrisc May 1, 2024
0e7ecc8
Fix ported change
webprofusion-chrisc May 2, 2024
caa3a76
Package updates and fix build
webprofusion-chrisc May 5, 2024
e6483c9
Package updates
webprofusion-chrisc May 6, 2024
9b73604
Data store cleanup and simplify
webprofusion-chrisc May 8, 2024
877bd3e
Cleanup
webprofusion-chrisc May 8, 2024
f41ace0
Package updates
webprofusion-chrisc May 8, 2024
694e7a8
Cleanup for nullability and warnings
webprofusion-chrisc May 13, 2024
cdd1aae
Package updates
webprofusion-chrisc May 18, 2024
4b2910a
Target AnyCPU and dotnet 9
webprofusion-chrisc Jun 4, 2024
a53ca21
Package updates
webprofusion-chrisc Jun 4, 2024
4f02b2f
Tasks: address compiler warning regarding argument order
webprofusion-chrisc Jun 4, 2024
6bb69e2
Cleanup
webprofusion-chrisc Jun 4, 2024
6080fb4
Tests: update certid tests
webprofusion-chrisc Jun 4, 2024
3e720be
Package update
webprofusion-chrisc Jun 6, 2024
cbb9d71
Misc cleanup
webprofusion-chrisc Jun 19, 2024
9f55eef
Refactor methods in certify manager
webprofusion-chrisc Jun 24, 2024
3843d61
Code generation proj fixes
webprofusion-chrisc Jun 24, 2024
314fd1f
Validation: Require any identifier
webprofusion-chrisc Jun 24, 2024
a668b7e
Request Certificate: only show exception message, not full stack trace
webprofusion-chrisc Jun 24, 2024
e058f6e
WIP: multi instance hub
webprofusion-chrisc Jun 19, 2024
c4f40bd
Svc: skip access control init for same version
webprofusion-chrisc Jun 28, 2024
3b83614
Cleanup
webprofusion-chrisc Jun 28, 2024
4300c0f
Package update
webprofusion-chrisc Jul 1, 2024
1977ec8
Management Hub: send regular heartbeat msg to hub
webprofusion-chrisc Jul 1, 2024
c90abd0
Extend and add test for demo data generator
webprofusion-chrisc Jul 2, 2024
a58eac7
Add delete API option as generated source
webprofusion-chrisc Jul 2, 2024
6acc576
Implement status summary per instance
webprofusion-chrisc Jul 7, 2024
52badcc
Package update
webprofusion-chrisc Jul 7, 2024
f057e4a
Implement logging via ms logging extensions (with serilog)
webprofusion-chrisc Jul 9, 2024
26a000b
Implement per instance log fetch and item challenge config test
webprofusion-chrisc Jul 9, 2024
71d63fe
Implement instance item preview, request, fix log reading
webprofusion-chrisc Jul 9, 2024
389f55a
Package updates
webprofusion-chrisc Jul 10, 2024
91905fc
Cleanup
webprofusion-chrisc Jul 10, 2024
18a5ace
Package updates
webprofusion-chrisc Jul 16, 2024
b57f757
Update actions
webprofusion-chrisc Jul 16, 2024
30e3fe6
Update dotnet version
webprofusion-chrisc Jul 17, 2024
b57c9c5
Test: fix primary domain test config
webprofusion-chrisc Jul 17, 2024
2980c2c
Powershell: improve script permission handling for impersonation acco…
webprofusion-chrisc Jul 17, 2024
45ed055
test build: specify project path
webprofusion-chrisc Jul 17, 2024
43b5a61
Package updates
webprofusion-chrisc Jul 18, 2024
89ba444
Minor updates to powershell manager
webprofusion-chrisc Jul 22, 2024
c23bceb
Cleanup
webprofusion-chrisc Jul 28, 2024
a4bde0c
Package updates
webprofusion-chrisc Jul 31, 2024
d3e42fa
Logging: fix debug log level
webprofusion-chrisc Aug 2, 2024
7067a4d
Add request throttling to http logging handler
webprofusion-chrisc Aug 2, 2024
1a77d6e
Clean up and sync with release
webprofusion-chrisc Aug 5, 2024
a5245da
Update DotNetCore_Unit_Tests_Win.yaml
webprofusion-chrisc Aug 6, 2024
dadd574
Port changes from latest release
webprofusion-chrisc Aug 9, 2024
0287256
Cleanup
webprofusion-chrisc Aug 9, 2024
0b3acfc
Update dev build props
webprofusion-chrisc Aug 12, 2024
97d751e
Package updates
webprofusion-chrisc Aug 12, 2024
da58b0f
Cleanup rebase from release branch
webprofusion-chrisc Aug 12, 2024
65ae8d4
Package updates
webprofusion-chrisc Aug 14, 2024
2746e2f
Package updates
webprofusion-chrisc Aug 18, 2024
e96f126
Package updates
webprofusion-chrisc Aug 19, 2024
83aadc8
Improved locking performance on .NET 9.0+
MarkCiliaVincenti Sep 1, 2024
5670659
Package updates
webprofusion-chrisc Sep 4, 2024
eac37c7
merge
MarkCiliaVincenti Sep 7, 2024
f74aa73
Hardening against thread aborts.
MarkCiliaVincenti Sep 7, 2024
dcd8cc4
Removed unnecessary LangVersion
MarkCiliaVincenti Sep 7, 2024
ff3cccc
Removed unnecessary using
MarkCiliaVincenti Sep 7, 2024
b42546b
Update Certify.Locales.csproj
MarkCiliaVincenti Sep 21, 2024
13ce84a
Update Certify.Shared.Core.csproj
MarkCiliaVincenti Sep 21, 2024
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
113 changes: 113 additions & 0 deletions .github/workflows/4_6_2_Core_Unit_Tests_Win.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: build and test .NET 4.6.2 Windows

on:
push:
pull_request:
branches: [ release, development ]
paths:
- '**.cs'
- '**.csproj'

env:
DOTNET_VERSION: '9.0.x' # The .NET SDK version to use

jobs:
build-and-test:
# if: ${{ ! always() }}
name: build-and-test-windows
runs-on: windows-latest
steps:
- name: Clone webprofusion/certify
uses: actions/checkout@master
with:
path: ./certify

- name: Clone webprofusion/anvil
uses: actions/checkout@master
with:
repository: webprofusion/anvil
ref: refs/heads/main
path: ./libs/anvil

- name: Clone webprofusion/certify-plugins (development branch push)
if: ${{ github.event_name == 'push' && (contains(github.ref_name, '_dev') || github.ref_name == 'development') }}
uses: actions/checkout@master
with:
repository: webprofusion/certify-plugins
ref: refs/heads/development
path: ./certify-plugins

- name: Clone webprofusion/certify-plugins (release branch push)
if: ${{ github.event_name == 'push' && (contains(github.ref_name, '_rel') || github.ref_name == 'release') }}
uses: actions/checkout@master
with:
repository: webprofusion/certify-plugins
ref: refs/heads/release
path: ./certify-plugins

- name: Clone webprofusion/certify-plugins (pull request)
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@master
with:
repository: webprofusion/certify-plugins
ref: ${{ github.base_ref }}
path: ./certify-plugins

- name: Setup .NET Core
uses: actions/setup-dotnet@master
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Setup Step CLI
run: |
Invoke-WebRequest -Method 'GET' -uri 'https://dl.smallstep.com/gh-release/cli/docs-cli-install/v0.24.4/step_windows_0.24.4_amd64.zip' -Outfile 'C:\temp\step_windows_0.24.4_amd64.zip'
tar -oxzf C:\temp\step_windows_0.24.4_amd64.zip -C "C:\Program Files"
echo "C:\Program Files\step_0.24.4\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Pull step-ca Docker Image
run: docker pull webprofusion/step-ca-win

- name: Cache NuGet Dependencies
uses: actions/cache@v3
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-4.6.2-nuget-${{ hashFiles('./certify/src/Certify.Tests/Certify.Core.Tests.Unit/*.csproj') }}
restore-keys: |
${{ runner.os }}-4.6.2-nuget

- name: Install Dependencies & Build Certify.Core.Tests.Unit
run: |
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.2.0
dotnet add package GitHubActionsTestLogger
dotnet build -c Debug -f net462 --property WarningLevel=0 /clp:ErrorsOnly
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit

- name: Run Certify.Core.Tests.Unit Tests
run: |
$env:GITHUB_WORKSPACE="$env:GITHUB_WORKSPACE\certify"
$env:GITHUB_STEP_SUMMARY=".\TestResults-${{ runner.os }}\test-summary.md"
dotnet test --no-build -f net462 -l "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true;annotations.messageFormat=@error\n@trace"
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit

- name: Generated Test Results Report
run: |
echo "# Test Results" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8
(Get-Content -Path .\TestResults-${{ runner.os }}\test-summary.md).Replace('<details>', '<details open>') | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit
if: ${{ always() }}

- name: Generated Test Coverage Report
run: |
reportgenerator -reports:./TestResults-${{ runner.os }}/*/*.cobertura.xml -targetdir:./TestResults-${{ runner.os }} -reporttypes:MarkdownSummaryGithub "-title:Test Coverage"
Get-Content -Path ./TestResults-${{ runner.os }}/SummaryGithub.md | Out-File -FilePath $env:GITHUB_STEP_SUMMARY
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit
if: ${{ always() }}

# - name: Upload dotnet test Artifacts
# uses: actions/upload-artifact@master
# with:
# name: dotnet-results-${{ runner.os }}-${{ env.DOTNET_VERSION }}
# path: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit/TestResults-4_6_2-${{ runner.os }}
# # Use always() to always run this step to publish test results when there are test failures
# if: ${{ always() }}
116 changes: 116 additions & 0 deletions .github/workflows/DotNetCore_Unit_Tests_Linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: build and test .NET Core 9.0 Linux

on:
push:
pull_request:
branches: [ release, development ]
paths:
- '**.cs'
- '**.csproj'

env:
DOTNET_VERSION: '9.0.x' # The .NET SDK version to use

jobs:
build-and-test:

name: build-and-test-linux
runs-on: ubuntu-latest
steps:
- name: Clone webprofusion/certify
uses: actions/checkout@master
with:
path: ./certify

- name: Clone webprofusion/anvil
uses: actions/checkout@master
with:
repository: webprofusion/anvil
ref: refs/heads/main
path: ./libs/anvil

- name: Clone webprofusion/certify-plugins (development branch push)
if: ${{ github.event_name == 'push' && (contains(github.ref_name, '_dev') || github.ref_name == 'development') }}
uses: actions/checkout@master
with:
repository: webprofusion/certify-plugins
ref: refs/heads/development
path: ./certify-plugins

- name: Clone webprofusion/certify-plugins (release branch push)
if: ${{ github.event_name == 'push' && (contains(github.ref_name, '_rel') || github.ref_name == 'release') }}
uses: actions/checkout@master
with:
repository: webprofusion/certify-plugins
ref: refs/heads/release
path: ./certify-plugins

- name: Clone webprofusion/certify-plugins (pull request)
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@master
with:
repository: webprofusion/certify-plugins
ref: ${{ github.base_ref }}
path: ./certify-plugins

- name: Setup .NET Core
uses: actions/setup-dotnet@master
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Setup Step CLI
run: |
wget https://dl.smallstep.com/gh-release/cli/docs-cli-install/v0.23.0/step-cli_0.23.0_amd64.deb
sudo dpkg -i step-cli_0.23.0_amd64.deb

- name: Pull step-ca Docker Image
run: docker pull smallstep/step-ca

- name: Cache NuGet Dependencies
uses: actions/cache@v3
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-${{ env.DOTNET_VERSION }}-nuget-${{ hashFiles('./certify/src/Certify.Tests/Certify.Core.Tests.Unit/*.csproj') }}
restore-keys: |
${{ runner.os }}-${{ env.DOTNET_VERSION }}-nuget

- name: Install Dependencies & Build Certify.Core.Tests.Unit
run: |
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.3.8
dotnet add package GitHubActionsTestLogger
dotnet restore -f net9.0
pwd
ls
dotnet build -c Debug -f net9.0 --property WarningLevel=0 /clp:ErrorsOnly
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit

- name: Run Certify.Core.Tests.Unit Tests
run: |
export GITHUB_WORKSPACE="$GITHUB_WORKSPACE/certify"
export GITHUB_STEP_SUMMARY="./TestResults-${{ runner.os }}/test-summary.md"
dotnet test --no-build -f net9.0 -l "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true;annotations.messageFormat=@error\n@trace"
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit

- name: Generate Test Results Report
run: |
echo "# Test Results" > $GITHUB_STEP_SUMMARY
sed -i 's/<details>/<details open>/g' ./TestResults-${{ runner.os }}/test-summary.md
cat ./TestResults-${{ runner.os }}/test-summary.md >> $GITHUB_STEP_SUMMARY
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit
if: ${{ always() }}

- name: Generated Test Coverage Report
run: |
reportgenerator -reports:./TestResults-${{ runner.os }}/*/*.cobertura.xml -targetdir:./TestResults-${{ runner.os }} -reporttypes:MarkdownSummaryGithub "-title:Test Coverage"
cat ./TestResults-${{ runner.os }}/SummaryGithub.md > $GITHUB_STEP_SUMMARY
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit
if: ${{ always() }}

# - name: Upload dotnet test Artifacts
# uses: actions/upload-artifact@master
# with:
# name: dotnet-results-${{ runner.os }}-${{ env.DOTNET_VERSION }}
# path: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit/TestResults-9_0-${{ runner.os }}
# # Use always() to always run this step to publish test results when there are test failures
# if: ${{ always() }}
114 changes: 114 additions & 0 deletions .github/workflows/DotNetCore_Unit_Tests_Win.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: build and test .NET Core 9.0 Windows

on:
push:
pull_request:
branches: [ release, development ]
paths:
- '**.cs'
- '**.csproj'

env:
DOTNET_VERSION: '9.0.x' # The .NET SDK version to use

jobs:
build-and-test:

name: build-and-test-windows
runs-on: windows-latest
steps:
- name: Clone webprofusion/certify
uses: actions/checkout@master
with:
path: ./certify

- name: Clone webprofusion/anvil
uses: actions/checkout@master
with:
repository: webprofusion/anvil
ref: refs/heads/main
path: ./libs/anvil

- name: Clone webprofusion/certify-plugins (development branch push)
if: ${{ github.event_name == 'push' && (contains(github.ref_name, '_dev') || github.ref_name == 'development') }}
uses: actions/checkout@master
with:
repository: webprofusion/certify-plugins
ref: refs/heads/development
path: ./certify-plugins

- name: Clone webprofusion/certify-plugins (release branch push)
if: ${{ github.event_name == 'push' && (contains(github.ref_name, '_rel') || github.ref_name == 'release') }}
uses: actions/checkout@master
with:
repository: webprofusion/certify-plugins
ref: refs/heads/release
path: ./certify-plugins

- name: Clone webprofusion/certify-plugins (pull request)
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@master
with:
repository: webprofusion/certify-plugins
ref: ${{ github.base_ref }}
path: ./certify-plugins

- name: Setup .NET Core
uses: actions/setup-dotnet@master
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Setup Step CLI
run: |
Invoke-WebRequest -Method 'GET' -uri 'https://dl.smallstep.com/gh-release/cli/docs-cli-install/v0.24.4/step_windows_0.24.4_amd64.zip' -Outfile 'C:\temp\step_windows_0.24.4_amd64.zip'
tar -oxzf C:\temp\step_windows_0.24.4_amd64.zip -C "C:\Program Files"
echo "C:\Program Files\step_0.24.4\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Pull step-ca Docker Image
run: docker pull webprofusion/step-ca-win

- name: Cache NuGet Dependencies
uses: actions/cache@v3
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-${{ env.DOTNET_VERSION }}-nuget-${{ hashFiles('./certify/src/Certify.Tests/Certify.Core.Tests.Unit/*.csproj') }}
restore-keys: |
${{ runner.os }}-${{ env.DOTNET_VERSION }}-nuget

- name: Install Dependencies & Build Certify.Core.Tests.Unit
run: |
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.2.0
dotnet add package GitHubActionsTestLogger
dotnet restore -f net9.0
dotnet build Certify.Core.Tests.Unit.csproj -c Debug -f net9.0 --property WarningLevel=0 /clp:ErrorsOnly
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit

- name: Run Certify.Core.Tests.Unit Tests
run: |
$env:GITHUB_WORKSPACE="$env:GITHUB_WORKSPACE\certify"
$env:GITHUB_STEP_SUMMARY=".\TestResults-${{ runner.os }}\test-summary.md"
dotnet test --no-build -f net9.0 -l "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true;annotations.messageFormat=@error\n@trace"
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit

- name: Generate Test Results Report
run: |
echo "# Test Results" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8
(Get-Content -Path .\TestResults-${{ runner.os }}\test-summary.md).Replace('<details>', '<details open>') | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit
if: ${{ always() }}

- name: Generated Test Coverage Report
run: |
reportgenerator -reports:./TestResults-${{ runner.os }}/*/*.cobertura.xml -targetdir:./TestResults-${{ runner.os }} -reporttypes:MarkdownSummaryGithub "-title:Test Coverage"
Get-Content -Path ./TestResults-${{ runner.os }}/SummaryGithub.md | Out-File -FilePath $env:GITHUB_STEP_SUMMARY
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit
if: ${{ always() }}

# - name: Upload dotnet test Artifacts
# uses: actions/upload-artifact@master
# with:
# name: dotnet-results-${{ runner.os }}-${{ env.DOTNET_VERSION }}
# path: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit/TestResults-9_0-${{ runner.os }}
# # Use always() to always run this step to publish test results when there are test failures
# if: ${{ always() }}
12 changes: 8 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<Project>
<PropertyGroup>
<Version>6.1.0</Version>
<AssemblyVersion>6.1.0</AssemblyVersion>
<Version>7.0.0</Version>
<AssemblyVersion>7.0.0</AssemblyVersion>
<Authors>Webprofusion Pty Ltd</Authors>
<Company>Webprofusion Pty Ltd</Company>
<Product>Certify Community Edition [via github]</Product>
<Product>Certify Certificate Manager - Community Edition [dev version via github]</Product>
<PackageProjectUrl>https://certifytheweb.com</PackageProjectUrl>
<RepositoryUrl>https://github.com/webprofusion/certify</RepositoryUrl>
<Deterministic>false</Deterministic>
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition="'$(OS)|$(Configuration)' == 'UNIX|Debug'"></Configuration>
<DebugType>portable</DebugType>
</PropertyGroup>
</Project>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ Testing Configuration

- In Visual Studio (or other Test UI such as AxoCover), set execution environment to 64-bit to ensure tests load.
- Units tests are for discreet function testing or limited component dependency tests.
- `CertifyManagerAccountTests` require an existing Prod and Staging ACME account for letsencrypt.org to exist. It also requires a `.env.test_accounts` file in the directory `C:\ProgramData\certify\Tests` with values for `RESTORE_KEY_PEM`, `RESTORE_ACCOUNT_URI`, and `RESTORE_ACCOUNT_EMAIL` for an existing letsencrypt.org ACME account
```.env
RESTORE_KEY_PEM="-----BEGIN EC PRIVATE KEY-----\r\nMHcCAQEEINL5koIn4o+an+EwyDQEd4Ggnxra5j7Oro13M5klKmhaoAoGCCqGSM49\r\nAwEHoUQDQgAEPF7u1CLMe9FIBQo0MVmv7vlvqGOdSERG5nRLkNKTDUgBRxkXGqY+\r\nGbnnzXUb7j4g7VN7CuEy0SpCdFItD+63hQ==\r\n-----END EC PRIVATE KEY-----\r\n"
RESTORE_ACCOUNT_URI=https://acme-staging-v02.api.letsencrypt.org/acme/acct/123456789
[email protected]
- Integration tests exercise multiple components and may interact with ACME services etc. Required elements include:
- IIS Installed on local machine
* A non-enabled site in IIS is needed for TestCertifyManagerGetPrimaryWebSitesIncludeStoppedSites() in CertifyManagerServerTypeTests.cs
- Must set IncludeExternalPlugins to true in C:\ProgramData\certify\appsettings.json and run copy-plugins.bat from certify-internal
- The debug version of the app must be configured with a contact against staging Let's Encrypt servers
- Completing HTTP challenges requires that the machine can respond to port 80 requests from the internet (such as the Let's Encrypt staging server checks)
- DNS API Credentials test and DNS Challenges require the respective DNS credentials by configured as saved credentials in the UI (see config below)
Expand All @@ -26,8 +33,7 @@ Testing Configuration
"Cloudflare_ZoneId": "5265262gdd562s4x6xd64zxczxcv",
"Cloudflare_TestDomain": "anothertest.com"
}
```
In addition, the test domain for some tests can be set using the CERTIFYSSLDOMAIN environment variable.

- In addition, the test domain for some tests can be set using the CERTIFY_TESTDOMAIN environment variable.



Loading