-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move results.Clear() into Dispose(), test for one fail not failing the whole set * Change to HotPotatoClient, HotPotatoRequest, HotPotatoResponse * Cleaning up some HotPotatoClient calls * Version and readme update * Trying ci action * Commenting out RestoreSources * Multiple Setup .NET Core version steps * Specify sln * Accidentally removed checkout step * v1 setup-dotnet * Separate 2.2 and 3.1 E2E tests * Trying just 3.1 for the E2E tests * Commenting out E2E tests for now * Try to set Action to run on every branch * GitVersion test 1 * yml not yaml * Capitalization? * Seeing how a cut-down yml acts * Test fetch-depth * Re-adding Mainline to yml * Release test 1 * Possible spacing issue * See if a step env sets global * Colon syntax * Syntax for IMAGE_VERSION * Dump outputs * Trying export for global * Release test 2 * Test release bools * Create pre-release package * See how Newman action is working * Forgot extension - didn't cause fail * Try Start Server step * Commenting out Newman for now, checking ref output * Master condition for release * Testing archiving artifacts * Testing archiving artifacts 2 * Testing archiving artifacts 3 * Testing archiving artifacts 4 * Testing archiving artifacts 4 6cf6247 Whole code coverage dir since the extensions were being problematic * Testing archiving artifacts 5 $GITHUB_WORKSPACE for cov * Uncomment master condition for Create Release * Update readme with try-finally option * bump to 2.0.0, remove ref log
- Loading branch information
1 parent
af040f4
commit 04917e8
Showing
34 changed files
with
308 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: Hot Potato CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
isMaster: ${{ github.ref == 'refs/heads/master' }} | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: '5.x' | ||
|
||
- name: Generate Version | ||
id: gitversion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
useConfigFile: true | ||
configFilePath: './GitVersion.yml' | ||
|
||
- name: Display GitVersion outputs | ||
run: | | ||
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}" | ||
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" | ||
- name: Setup .NET Core 2.2 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 2.2.x | ||
|
||
- name: Setup .NET Core 3.1 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 3.1.x | ||
|
||
- name: Build | ||
run: | | ||
dotnet build --configuration Release -p:Version=${{ steps.gitversion.outputs.majorMinorPatch }} | ||
- name: Run Unit Tests .NET 2.2 | ||
run: | | ||
dotnet test ./test/HotPotato.Core.Test/HotPotato.Core.Test.csproj -f "netcoreapp2.2" -c Release -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=$GITHUB_WORKSPACE/test/coverage/coreCoverage.xml -p:Exclude="[xunit.*]*" -l:"JUnit;LogFilePath=$GITHUB_WORKSPACE/test/results/coreResults.xml" --no-restore --no-build | ||
dotnet test ./test/HotPotato.AspNetCore.Middleware.Test/HotPotato.AspNetCore.Middleware.Test.csproj -f "netcoreapp2.2" -c Release -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=$GITHUB_WORKSPACE/test/coverage/middlewareCoverage.xml -p:Include="[*.Middleware]*" -l:"JUnit;LogFilePath=$GITHUB_WORKSPACE/test/results/middlewareResults.xml" --no-restore --no-build | ||
dotnet test ./test/HotPotato.OpenApi.Test/HotPotato.OpenApi.Test.csproj -f "netcoreapp2.2" -c Release -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=$GITHUB_WORKSPACE/test/coverage/openApiCoverage.xml -p:Include="[*.OpenApi]*" -l:"JUnit;LogFilePath=$GITHUB_WORKSPACE/test/results/openapiResults.xml" --no-restore --no-build | ||
- name: Run Unit Tests .NET 3.1 | ||
run: | | ||
dotnet test ./test/HotPotato.Core.Test/HotPotato.Core.Test.csproj -f "netcoreapp3.1" -c Release -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=$GITHUB_WORKSPACE/test/coverage/coreCoverage.xml -p:Exclude="[xunit.*]*" -l:"JUnit;LogFilePath=$GITHUB_WORKSPACE/test/results/coreResults.xml" --no-restore --no-build | ||
dotnet test ./test/HotPotato.AspNetCore.Middleware.Test/HotPotato.AspNetCore.Middleware.Test.csproj -f "netcoreapp3.1" -c Release -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=$GITHUB_WORKSPACE/test/coverage/middlewareCoverage.xml -p:Include="[*.Middleware]*" -l:"JUnit;LogFilePath=$GITHUB_WORKSPACE/test/results/middlewareResults.xml" --no-restore --no-build | ||
dotnet test ./test/HotPotato.OpenApi.Test/HotPotato.OpenApi.Test.csproj -f "netcoreapp3.1" -c Release -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=$GITHUB_WORKSPACE/test/coverage/openApiCoverage.xml -p:Include="[*.OpenApi]*" -l:"JUnit;LogFilePath=$GITHUB_WORKSPACE/test/results/openapiResults.xml" --no-restore --no-build | ||
- name: Run Integration Tests | ||
run: | | ||
dotnet test ./test/HotPotato.Integration.Test/HotPotato.Integration.Test.csproj -f "netcoreapp2.2" -c Release -l:"JUnit;LogFilePath=$GITHUB_WORKSPACE/test/results/integrationResults.xml" --no-restore --no-build | ||
dotnet test ./test/HotPotato.Integration.Test/HotPotato.Integration.Test.csproj -f "netcoreapp3.1" -c Release -l:"JUnit;LogFilePath=$GITHUB_WORKSPACE/test/results/integrationResults.xml" --no-restore --no-build | ||
# Commenting out until we figure out the best way to deal with the hosted spec for these tests | ||
# - name: Run E2E Tests .NET 2.2 | ||
# run: | | ||
# dotnet test ./test/HotPotato.E2E.Test/HotPotato.E2E.Test.csproj -f "netcoreapp2.2" -c Release -l:"JUnit;LogFilePath=$GITHUB_WORKSPACE/test/results/E2EResults.xml" --no-restore --no-build | ||
# - name: Run E2E Tests .NET 3.1 | ||
# run: | | ||
# dotnet test ./test/HotPotato.TestServer.Test/HotPotato.TestServ.Test.csproj -c Release -l:"JUnit;LogFilePath=$GITHUB_WORKSPACE/test/results/testServerResults.xml" --no-restore --no-build | ||
# dotnet test ./test/HotPotato.E2E.Test/HotPotato.E2E.Test.csproj -f "netcoreapp3.1" -c Release -l:"JUnit;LogFilePath=$GITHUB_WORKSPACE/test/results/E2EResults.xml" --no-restore --no-build | ||
|
||
# - name: Start Hot Potato For Postman Tests | ||
# run: | | ||
# dotnet $GITHUB_WORKSPACE/src/HotPotato.AspNetCore.Host/bin/Release/netcoreapp3.1/HotPotato.AspNetCore.Host.dll & | ||
# dotnet $GITHUB_WORKSPACE/test/HotPotato.Api/bin/Release/netcoreapp3.1/HotPotato.Api.dll & | ||
|
||
# - name: Run Postman Tests | ||
# uses: anthonyvscode/newman-action@v1 | ||
# with: | ||
# collection: ./test/HappyPathTests.postman_collection.json | ||
# reporters: cli | ||
|
||
- name: Archive code coverage results | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: code-coverage-reports | ||
path: ./test/coverage/*.xml | ||
|
||
- name: Archive test results | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: test-results | ||
path: ./test/results/*.xml | ||
|
||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
if: ${{ success() && env.isMaster == 'true' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ steps.gitversion.outputs.nuGetVersionV2 }} | ||
release_name: ${{ steps.gitversion.outputs.nuGetVersionV2 }} | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
next-version: 0.1.2 | ||
next-version: 2.0.0 | ||
mode: Mainline | ||
branches: | ||
master: | ||
regex: (^master$|^origin\/master$) | ||
develop: | ||
regex: (^dev(elop)?(ment)?$|^origin\/dev(elop)?(ment)?$) | ||
regex: (^master$|^origin\/master$) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
|
||
<PropertyGroup> | ||
<TargetFrameworks>netcoreapp2.2;netcoreapp3.1</TargetFrameworks> | ||
<RestoreSources> | ||
<!-- <RestoreSources> | ||
https://proget.onbase.net/nuget/NuGet/; | ||
</RestoreSources> | ||
</RestoreSources> --> | ||
<PackageVersion></PackageVersion> | ||
<Title>HotPotato.Core</Title> | ||
<Authors>Test Automation Team | [email protected]</Authors> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.