Skip to content

Commit

Permalink
Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
scottt732 committed Nov 5, 2023
1 parent 4f0d853 commit ceb2ed8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,17 @@ jobs:
- name: "Dotnet Cake Pack"
run: dotnet cake --target=Pack

- name: 'Publish Artifacts'
- name: 'Publish Test Result Artifacts'
uses: actions/upload-artifact@v3
with:
name: ubuntu-latest
path: './Artifacts/*'
name: test-results
path: './Artifacts/TestResults/**/*'

- name: 'Publish Package Artifacts'
uses: actions/upload-artifact@v3
with:
name: packages
path: './Artifacts/Packages/*'

publish-test-results:
name: "Publish Tests Results"
Expand All @@ -66,10 +72,13 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: "Download Artifact"
- name: "Download Test Result Artifacts"
uses: actions/download-artifact@v3.0.2
with:
name: test-results
path: "./Artifacts"
- name: "Hmm"
run: find . -name .git -prune -o -name bin -prune -o -name obj -prune -o -name .vs -prune -o -name .vscode -prune -o -name .devcontainer -prune -o -name _ReSharper.Caches -prune -o -name .scripts -prune -o -name .nuget -prune -o -name .github -prune -o -type f -print
- name: "Publish Test Summary"
uses: test-summary/action@v2
if: always()
Expand All @@ -90,12 +99,13 @@ jobs:
- name: "Download Artifact"
uses: actions/download-artifact@v3.0.2
with:
name: "ubuntu-latest"
name: "packages"
path: "./Artifacts"
- name: "Dotnet NuGet Add Source"
run: dotnet nuget add source https://nuget.pkg.github.com/scottt732/index.json --name GitHub --username 'scottt732' --password '${{secrets.GITHUB_TOKEN}}' --store-password-in-clear-text
shell: pwsh
- name: "Hmm"
run: find . -name .git -prune -o -name bin -prune -o -name obj -prune -o -name .vs -prune -o -name .vscode -prune -o -name .devcontainer -prune -o -name _ReSharper.Caches -prune -o -name .scripts -prune -o -name .nuget -prune -o -name .github -prune -o -type d -print
run: find . -name .git -prune -o -name bin -prune -o -name obj -prune -o -name .vs -prune -o -name .vscode -prune -o -name .devcontainer -prune -o -name _ReSharper.Caches -prune -o -name .scripts -prune -o -name .nuget -prune -o -name .github -prune -o -type f -print
- name: "Dotnet NuGet Push Libraries"
run: dotnet nuget push ${{ github.workspace }}/Artifacts/*.nupkg --api-key '${{ github.token }}' --source GitHub --skip-duplicate
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion Source/Sholo.Mqtt/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.1-alpha.18
0.2.1-alpha.21
8 changes: 6 additions & 2 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ var configuration =
"Release";

var artifactsDirectory = Directory("./Artifacts");
var testResultArtifactsDirectory = Directory("./Artifacts/TestResults");
var packageArtifactsDirectory = Directory("./Artifacts/Packages");

Task("Clean")
.Description("Cleans the artifacts, bin and obj directories.")
.Does(() =>
{
CleanDirectory(artifactsDirectory);
CleanDirectory(testResultArtifactsDirectory);
CleanDirectory(packageArtifactsDirectory);
DeleteDirectories(GetDirectories("**/bin"), new DeleteDirectorySettings() { Force = true, Recursive = true });
DeleteDirectories(GetDirectories("**/obj"), new DeleteDirectorySettings() { Force = true, Recursive = true });
});
Expand Down Expand Up @@ -56,7 +60,7 @@ Task("Test")
},
NoBuild = true,
NoRestore = true,
ResultsDirectory = artifactsDirectory,
ResultsDirectory = testResultArtifactsDirectory,
ArgumentCustomization = x => x.Append("--blame"),
});
});
Expand All @@ -74,7 +78,7 @@ Task("Pack")
MSBuildSettings = new DotNetMSBuildSettings().WithProperty("SymbolPackageFormat", "snupkg"),
NoBuild = true,
NoRestore = true,
OutputDirectory = artifactsDirectory,
OutputDirectory = packageArtifactsDirectory,
});
});

Expand Down

0 comments on commit ceb2ed8

Please sign in to comment.