Skip to content

Commit

Permalink
housekeeping: add Int tests and benchmark projects (#1242)
Browse files Browse the repository at this point in the history
* add benchmark project

* add int tests to ci

* report int test coverage

* prep to move to mockstartup app for int tests

* Update Directory.build.props

* prep for web test harness

* Update Whipstaff.Runtime.csproj

* fix int test build failures

* logic for swahbuckle nonce

* hook up logging properly

* allowed inheriting route binding

* *BREAKING* dropped MVC support on existing controllers

* tidied up app startup

* rename index page

* tweak mvc sample startup

* fix issue with home controller

* refactor crud routes

* ns cleanup

* clear up constraint ordering on controllers

* ANE cleanup and dbcontext factory

* remark 3rd party app insights check for now

* Delete SecuredWebsiteTests.cs

* remove defunct tests

* tweaks to controller init

* Delete ApplicationModelConventionHelpers.cs

* clean up audit.net init

* swagger init cleanup

* add tests for web app host

* increase startup tests

* fix mvc startup and int tests on policies

* correct testing folder name

* fix project ref for test project
  • Loading branch information
dpvreony committed Aug 29, 2023
1 parent ad4624e commit 76e3bf6
Show file tree
Hide file tree
Showing 98 changed files with 1,544 additions and 963 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/dotnet-core.yml
Expand Up @@ -19,6 +19,8 @@ jobs:
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
solutionpath: src/Whipstaff.sln
unittestprojectpath: src/Whipstaff.UnitTests/Whipstaff.UnitTests.csproj
inttestprojectpath: src/Whipstaff.IntegrationTests/Whipstaff.IntegrationTests.csproj
benchmarkprojectpath: src/Whipstaff.IntegrationTests/Whipstaff.Benchmarks.csproj
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -152,11 +154,18 @@ jobs:
echo "::notice::$coverageMessage"
echo $coverageMessage >> $GITHUB_STEP_SUMMARY
#- name: Train Intellicode Model
# uses: microsoft/vs-intellicode@v1
# if: github.ref == 'refs/heads/main'
# with:
# directory: src
# integration tests run after sonarscanner and unit test reporting so if the integration tests fail the report still uploads so we can see defects detected by sonarscanner and any unit test coverage issues.
- name: Run Integration Tests
run: |
dotnet test ${{ env.inttestprojectpath }} --configuration Release --no-build /bl:artifacts\\binlog\\inttest.binlog --nologo --logger GitHubActions --blame-hang-timeout 60000 --results-directory artifacts\inttestcoverage --collect:"XPlat Code Coverage" /p:CollectCoverage=true /p:DeterministicSourcePaths=false -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Report Integration Test Coverage
run: |
$opencoverxmlpath = Get-ChildItem 'artifacts/inttestcoverage/**/*.xml' | Select-Object -First 1
$intTestCoverage = (Select-Xml -Path $opencoverxmlpath -XPath 'CoverageSession/Summary/@branchCoverage').Node.Value
$coverageMessage = "Integration Test Coverage: $intTestCoverage"
echo "::notice::$coverageMessage"
echo $coverageMessage >> $GITHUB_STEP_SUMMARY
- name: List licenses
run: |
Expand Down

0 comments on commit 76e3bf6

Please sign in to comment.