mirror of
https://github.com/NexusOne23/noid-privacy.git
synced 2026-02-25 12:44:18 +01:00
v2.2.0 - Complete Security Hardening Framework (632 Settings)
This commit is contained in:
commit
ba364813ed
195 changed files with 43788 additions and 0 deletions
71
.github/workflows/pester-tests.yml
vendored
Normal file
71
.github/workflows/pester-tests.yml
vendored
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
name: Pester Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Pester
|
||||
shell: pwsh
|
||||
run: |
|
||||
Install-Module -Name Pester -Force -SkipPublisherCheck -Scope CurrentUser
|
||||
Import-Module Pester
|
||||
|
||||
- name: Run Unit Tests
|
||||
shell: pwsh
|
||||
run: |
|
||||
$config = New-PesterConfiguration
|
||||
$config.Run.Path = "Tests/Unit"
|
||||
$config.Run.PassThru = $true
|
||||
$config.Output.Verbosity = 'Detailed'
|
||||
$config.TestResult.Enabled = $true
|
||||
$config.TestResult.OutputPath = "TestResults-Unit.xml"
|
||||
$config.TestResult.OutputFormat = 'NUnitXml'
|
||||
|
||||
$results = Invoke-Pester -Configuration $config
|
||||
|
||||
if ($results.FailedCount -gt 0) {
|
||||
Write-Error "Unit tests failed: $($results.FailedCount) failures"
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Run Integration Tests (DryRun only)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$config = New-PesterConfiguration
|
||||
$config.Run.Path = "Tests/Integration"
|
||||
$config.Run.PassThru = $true
|
||||
$config.Output.Verbosity = 'Detailed'
|
||||
$config.TestResult.Enabled = $true
|
||||
$config.TestResult.OutputPath = "TestResults-Integration.xml"
|
||||
$config.TestResult.OutputFormat = 'NUnitXml'
|
||||
|
||||
$results = Invoke-Pester -Configuration $config
|
||||
|
||||
if ($results.FailedCount -gt 0) {
|
||||
Write-Error "Integration tests failed: $($results.FailedCount) failures"
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Upload Test Results
|
||||
uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: test-results
|
||||
path: TestResults-*.xml
|
||||
|
||||
- name: Publish Test Results
|
||||
uses: EnricoMi/publish-unit-test-result-action/windows@v2
|
||||
if: always()
|
||||
with:
|
||||
files: TestResults-*.xml
|
||||
Loading…
Add table
Add a link
Reference in a new issue