Skip to content

Commit

Permalink
try option #2 from ilker's suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
TYoungSL committed Jul 20, 2021
1 parent b3b6272 commit d976485
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 34 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@ jobs:
- uses: actions/[email protected]
with:
dotnet-version: 5.0.x
source-url: https://nuget.pkg.github.com/StirlingLabs/index.json
env:
NUGET_AUTH_TOKEN: ${{ github.token }}
- name: NuGet Auth
shell: bash
run: |
[ ! -f ~/NuGet.config ] && echo '<?xml version="1.0" encoding="utf-8"?><configuration/>' > ~/NuGet.Config
dotnet nuget add source https://nuget.pkg.github.com/${{github.repository_owner}}/index.json \
--configfile ~/NuGet.Config \
-n GitHub-${{github.repository_owner}} \
-u ${{github.repository_owner}} \
-p ${{secrets.DAEMON_NUGET_ADMIN}} \
--store-password-in-clear-text
- name: Build
run: dotnet build StirlingLabs.Utilities.Net.sln -c Release
- name: Test
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@ jobs:
- uses: actions/[email protected]
with:
dotnet-version: 5.0.x
source-url: https://nuget.pkg.github.com/StirlingLabs/index.json
env:
NUGET_AUTH_TOKEN: ${{ github.token }}
- name: NuGet Auth
shell: bash
run: |
[ ! -f ~/NuGet.config ] && echo '<?xml version="1.0" encoding="utf-8"?><configuration/>' > ~/NuGet.Config
dotnet nuget add source https://nuget.pkg.github.com/${{github.repository_owner}}/index.json \
--configfile ~/NuGet.Config \
-n GitHub-${{github.repository_owner}} \
-u ${{github.repository_owner}} \
-p ${{secrets.DAEMON_NUGET_ADMIN}} \
--store-password-in-clear-text
- name: Build
run: dotnet build StirlingLabs.Utilities.Net.sln -c Release
env:
NUGET_AUTH_TOKEN: ${{ github.token }}
- name: Test
run: dotnet test StirlingLabs.Utilities.Net.sln --no-build -c Release --logger GitHubActions
- name: Artifacts
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/ci-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,16 @@ jobs:
- uses: actions/[email protected]
with:
dotnet-version: 5.0.x
source-url: https://nuget.pkg.github.com/StirlingLabs/index.json
env:
NUGET_AUTH_TOKEN: ${{ github.token }}
- name: NuGet Auth
shell: bash
run: |
[ ! -f ~/NuGet.config ] && echo '<?xml version="1.0" encoding="utf-8"?><configuration/>' > ~/NuGet.Config
dotnet nuget add source https://nuget.pkg.github.com/${{github.repository_owner}}/index.json \
--configfile ~/NuGet.Config \
-n GitHub-${{github.repository_owner}} \
-u ${{github.repository_owner}} \
-p ${{secrets.DAEMON_NUGET_ADMIN}} \
--store-password-in-clear-text
- name: Build
run: dotnet build StirlingLabs.Utilities.Net.sln -c Release
- name: Test
Expand Down
24 changes: 5 additions & 19 deletions StirlingLabs.Utilities.Tests/StirlingLabs.Utilities.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoBogus" Version="2.13.0" />
<PackageReference Include="AutoBogus" Version="2.13.1" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
Expand All @@ -22,31 +22,17 @@
</ItemGroup>
<Target Name="GenerateHtmlCoverageReport" AfterTargets="GenerateCoverageResultAfterTest">
<!-- remove absolute path using backslashes for windows -->
<ReplaceFileTextByLines
Condition="$(OS.StartsWith('Windows'))"
InputFilename="@(CoverletReport)"
OutputFilename="@(CoverletReport)"
MatchText="$([System.IO.Path]::GetFullPath('..\StirlingLabs.Utilities\'))"
ReplacementText="" />
<ReplaceFileTextByLines Condition="$(OS.StartsWith('Windows'))" InputFilename="@(CoverletReport)" OutputFilename="@(CoverletReport)" MatchText="$([System.IO.Path]::GetFullPath('..\StirlingLabs.Utilities\'))" ReplacementText="" />

<!-- remove absolute path using forward slashes for other platforms -->
<ReplaceFileTextByLines
Condition="!$(OS.StartsWith('Windows'))"
InputFilename="@(CoverletReport)"
OutputFilename="@(CoverletReport)"
MatchText="$([System.IO.Path]::GetFullPath('../StirlingLabs.Utilities/'))"
ReplacementText="" />
<ReplaceFileTextByLines Condition="!$(OS.StartsWith('Windows'))" InputFilename="@(CoverletReport)" OutputFilename="@(CoverletReport)" MatchText="$([System.IO.Path]::GetFullPath('../StirlingLabs.Utilities/'))" ReplacementText="" />

<!-- generate markdown coverage report and badges -->
<ReportGenerator ReportFiles="@(CoverletReport)"
ReportTypes="MarkdownSummary;Badges"
SourceDirectories="../StirlingLabs.Utilities"
TargetDirectory="../coverage/" />
<ReportGenerator ReportFiles="@(CoverletReport)" ReportTypes="MarkdownSummary;Badges" SourceDirectories="../StirlingLabs.Utilities" TargetDirectory="../coverage/" />
</Target>

<!-- task to replace text line for line -->
<UsingTask TaskName="ReplaceFileTextByLines" TaskFactory="RoslynCodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<UsingTask TaskName="ReplaceFileTextByLines" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<InputFilename ParameterType="System.String" Required="true" />
<OutputFilename ParameterType="System.String" Required="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2020.3.0" PrivateAssets="all" />
<PackageReference Include="YamlDotNet" Version="11.2.0" />
<PackageReference Include="YamlDotNet" Version="11.2.1" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions StirlingLabs.Utilities/StirlingLabs.Utilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
</ImportGroup>

<ItemGroup>
<PackageReference Include="Fody" Version="6.5.1">
<PackageReference Include="Fody" Version="6.5.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="InlineIL.Fody" Version="1.7.0" PrivateAssets="all" />
<PackageReference Include="InlineIL.Fody" Version="1.7.1" PrivateAssets="all" />
<PackageReference Include="JetBrains.Annotations" Version="2020.3.0" PrivateAssets="all" />
<PackageReference Include="StirlingLabs.BigSpans" Version="21.7.0-pre-462b7" />
<PackageReference Include="XKCP.NET" Version="21.7.0-rc1" />
<PackageReference Include="XKCP.NET" Version="21.7.2" />
</ItemGroup>
</Project>

0 comments on commit d976485

Please sign in to comment.