Skip to content

Commit b3451c0

Browse files
Use solution target to filter out samples
1 parent a2f78b8 commit b3451c0

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
XUNIT_PATH: .\tests\ImageSharp.Web.Tests # Required for xunit
7575

7676
- name: Update Codecov
77-
uses: codecov/codecov-action@v1.0.7
77+
uses: codecov/codecov-action@v1
7878
if: matrix.options.codecov == true && startsWith(github.repository, 'SixLabors')
7979
with:
8080
flags: unittests

ImageSharp.Web.sln

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_root", "_root", "{C317F1B1
77
ProjectSection(SolutionItems) = preProject
88
.editorconfig = .editorconfig
99
.gitignore = .gitignore
10+
after.ImageSharp.Web.sln.targets = after.ImageSharp.Web.sln.targets
1011
ci-build.ps1 = ci-build.ps1
1112
ci-pack.ps1 = ci-pack.ps1
1213
ci-test.ps1 = ci-test.ps1
@@ -133,6 +134,7 @@ Global
133134
{8F40DEC6-A97F-4002-A504-13E188665A98}.Debug|x86.ActiveCfg = Debug|Any CPU
134135
{8F40DEC6-A97F-4002-A504-13E188665A98}.Debug|x86.Build.0 = Debug|Any CPU
135136
{8F40DEC6-A97F-4002-A504-13E188665A98}.Release|Any CPU.ActiveCfg = Release|Any CPU
137+
{8F40DEC6-A97F-4002-A504-13E188665A98}.Release|Any CPU.Build.0 = Release|Any CPU
136138
{8F40DEC6-A97F-4002-A504-13E188665A98}.Release|x64.ActiveCfg = Release|Any CPU
137139
{8F40DEC6-A97F-4002-A504-13E188665A98}.Release|x64.Build.0 = Release|Any CPU
138140
{8F40DEC6-A97F-4002-A504-13E188665A98}.Release|x86.ActiveCfg = Release|Any CPU

after.ImageSharp.Web.sln.targets

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Remove the samples project from the build when running in CI.
4+
This prevents build issues when targeting lower, unused target frameworks.
5+
See https://t.co/0A4WzeGMZS
6+
-->
7+
<Project InitialTargets="RemoveSamples">
8+
<Target Name="RemoveSamples">
9+
<ItemGroup>
10+
<ProjectReference
11+
Remove="$(MSBuildThisFileDirectory)\samples\ImageSharp.Web.Sample\ImageSharp.Web.Sample.csproj"
12+
Condition="'$(GITHUB_ACTIONS)' == 'true'"/>
13+
</ItemGroup>
14+
</Target>
15+
</Project>

0 commit comments

Comments
 (0)