-
-
Notifications
You must be signed in to change notification settings - Fork 889
Harden memory-intensive tests, repurpose Sandbox46 #1089
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
a2e22a8
update xunit & workaround conversion issues
antonfirsov 964f12b
Run ArrayPoolMemoryAllocatorTests in separate process,
antonfirsov adc8928
use RemoteExecutor in JpegDecoderTests
antonfirsov 1b6cc28
workaround RemoteExecutor assembly redirect issue on 472,
antonfirsov beb8a51
add .csproj change
antonfirsov 97396e6
when running tests in 32 bits, enforce 32bit execution of RemoteExecu…
antonfirsov 3e33bb3
avoid exceptions in PrepareRemoteExecutor()
antonfirsov ec3809e
cleanup PrepareRemoteExecutor()
antonfirsov 57542c9
Sandbox46: reference Test classes rather than include
antonfirsov f55533d
rename Sandbox46 to ImageSharp.Tests.ProfilingSandbox
antonfirsov 2da044b
cleanup ProfilingSandbox
antonfirsov 78aed16
minor fixes
antonfirsov 9089e3c
comments
antonfirsov f5c5b00
fix comment text
antonfirsov e6f8d46
Update codecov calc and use inbuild ref source/targets
JimBobSquarePants 6f832aa
Actually upload report
JimBobSquarePants 2cb6567
Test to see if colorspace tests are ran?
JimBobSquarePants 87f002e
Revert "Test to see if colorspace tests are ran?"
JimBobSquarePants a1ed205
Run codecov tests in debug mode.
JimBobSquarePants 84b850d
Filter xunit references so testrunner does not throw.
JimBobSquarePants e115ba6
LambdaProvider -> serializable MemberMethodProvider
antonfirsov b823860
Merge branch 'af/improve-tests' of https://github.com/SixLabors/Image…
antonfirsov 23b9423
Revert HSL<=>Rgb test changes
JimBobSquarePants 4519c55
Update README.md
JimBobSquarePants File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -82,24 +82,64 @@ jobs: | |
| shell: pwsh | ||
| run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}" | ||
| env: | ||
| CI : True | ||
| CI: True | ||
| XUNIT_PATH: .\tests\ImageSharp.Tests # Required for xunit | ||
|
|
||
| - name: Update Codecov | ||
| uses: iansu/[email protected] | ||
| if: matrix.options.codecov == true | ||
| with: | ||
| token: ${{secrets.CODECOV_TOKEN}} | ||
| file: "coverage.${{matrix.options.framework}}.xml" | ||
| flags: unittests | ||
|
|
||
| - name: Pack # We can use this filter as we know it happens only once and takes the most time to complete. | ||
| if: (github.event_name == 'push') && (matrix.options.codecov == true) | ||
| Publish: | ||
| needs: [Build] | ||
|
|
||
| runs-on: windows-latest | ||
|
|
||
| if: (github.event_name == 'push') | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: Install NuGet | ||
| uses: NuGet/setup-nuget@v1 | ||
|
|
||
| - name: Setup Git | ||
| shell: bash | ||
| run: | | ||
| git config --global core.autocrlf false | ||
| git config --global core.longpaths true | ||
| git fetch --prune --unshallow | ||
| git submodule -q update --init --recursive | ||
|
|
||
| - name: Fetch Tags for GitVersion | ||
| run: | | ||
| git fetch --tags | ||
|
|
||
| - name: Fetch master for GitVersion | ||
| if: github.ref != 'refs/heads/master' | ||
| run: git branch --create-reflog master origin/master | ||
|
|
||
| - name: Install GitVersion | ||
| uses: gittools/actions/[email protected] | ||
| with: | ||
| versionSpec: "5.1.x" | ||
|
|
||
| - name: Use GitVersion | ||
| id: gitversion # step id used as reference for output values | ||
| uses: gittools/actions/[email protected] | ||
|
|
||
| - name: Setup DotNet SDK | ||
| uses: actions/setup-dotnet@v1 | ||
| with: | ||
| dotnet-version: "3.1.101" | ||
|
|
||
| - name: Pack | ||
| shell: pwsh | ||
| run: ./ci-build.ps1 "${{steps.gitversion.outputs.nuGetVersion}}" | ||
| run: ./ci-pack.ps1 "${{steps.gitversion.outputs.nuGetVersion}}" | ||
|
|
||
| - name: Publish to MyGet | ||
| if: (github.event_name == 'push') && (matrix.options.codecov == true) | ||
| shell: pwsh | ||
| run: nuget.exe push .\artifacts\*.nupkg ${{secrets.MYGET_TOKEN}} -Source https://www.myget.org/F/sixlabors/api/v2/package | ||
| # TODO: If github.ref starts with 'refs/tags' then it was tag push and we can optionally push out package to nuget.org | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,20 +1,13 @@ | ||
| param( | ||
| [Parameter(Mandatory, Position = 0)] | ||
| [string]$version, | ||
| [Parameter(Mandatory = $false, Position = 1)] | ||
| [string]$targetFramework = 'ALL' | ||
| [Parameter(Mandatory = $true, Position = 1)] | ||
| [string]$targetFramework | ||
| ) | ||
|
|
||
| dotnet clean -c Release | ||
|
|
||
| $repositoryUrl = "https://github.com/$env:GITHUB_REPOSITORY" | ||
| if ($targetFramework -ne 'ALL') { | ||
|
|
||
| # Building for a specific framework. | ||
| dotnet build -c Release -f $targetFramework /p:packageversion=$version /p:RepositoryUrl=$repositoryUrl | ||
| } | ||
| else { | ||
|
|
||
| # Building for packing and publishing. | ||
| dotnet pack -c Release --output "$PSScriptRoot/artifacts" /p:packageversion=$version /p:RepositoryUrl=$repositoryUrl | ||
| } | ||
| # Building for a specific framework. | ||
| dotnet build -c Release -f $targetFramework /p:packageversion=$version /p:RepositoryUrl=$repositoryUrl |
This file contains hidden or 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,11 @@ | ||
| param( | ||
| [Parameter(Mandatory, Position = 0)] | ||
| [string]$version | ||
| ) | ||
|
|
||
| dotnet clean -c Release | ||
|
|
||
| $repositoryUrl = "https://github.com/$env:GITHUB_REPOSITORY" | ||
|
|
||
| # Building for packing and publishing. | ||
| dotnet pack -c Release --output "$PSScriptRoot/artifacts" /p:packageversion=$version /p:RepositoryUrl=$repositoryUrl |
This file contains hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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
14 changes: 5 additions & 9 deletions
14
tests/ImageSharp.Sandbox46/Program.cs → ...geSharp.Tests.ProfilingSandbox/Program.cs
This file contains hidden or 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 hidden or 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,2 @@ | ||
| ## ImageSharp.Tests.ProfilingSandbox | ||
| Helper project to run and profile unit tests or other "sandbox" code from a single .exe entry point. |
File renamed without changes.
This file contains hidden or 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,6 @@ | ||
| // Copyright (c) Six Labors and contributors. | ||
| // Licensed under the Apache License, Version 2.0. | ||
|
|
||
| using System.Runtime.CompilerServices; | ||
|
|
||
| [assembly:InternalsVisibleTo("ImageSharp.Tests.ProfilingSandbox")] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.