Skip to content

Commit

Permalink
try something else?
Browse files Browse the repository at this point in the history
  • Loading branch information
connorivy committed Dec 3, 2024
1 parent ee21e0b commit ce21741
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 10 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- name: Test And Collect CodeCov
run: |
dotnet tool install --global dotnet-coverage
# export PATH="$PATH:/root/.dotnet/tools"
dotnet-coverage collect "dotnet run --project ./tests/MockMe.Tests.Runner/" -f cobertura -s ./CodeCoverage.runsettings
- name: Generate report
Expand All @@ -28,8 +29,15 @@ jobs:
reports: './output.cobertura.xml'
targetdir: './tests/TestResults'
reporttypes: 'lcov'
# reporttypes: 'html'
filefilters: '-*\*.g.cs'

# - name: Upload Report
# uses: actions/upload-artifact@v4
# with:
# name: report
# path: ./tests/TestResults

- name: Coveralls
uses: coverallsapp/github-action@master
with:
Expand Down
1 change: 0 additions & 1 deletion MockMe.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.github\workflows\buildAndTest.yml = .github\workflows\buildAndTest.yml
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
global.json = global.json
.github\workflows\publishWiki.yml = .github\workflows\publishWiki.yml
README.md = README.md
.github\workflows\release.yml = .github\workflows\release.yml
Expand Down
6 changes: 0 additions & 6 deletions global.json

This file was deleted.

40 changes: 37 additions & 3 deletions tests/MockMe.Tests.Runner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,53 @@

Console.WriteLine("Hello, World!");

var testsFolderPath = Path.Combine(Assembly.GetExecutingAssembly().Location, @"..\..\..\..\..");
var testsFolderPath = Path.Combine(
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),

Check warning on line 8 in tests/MockMe.Tests.Runner/Program.cs

View workflow job for this annotation

GitHub Actions / build_and_pack

Possible null reference argument for parameter 'paths' in 'string Path.Combine(params string[] paths)'.
"..",
"..",
"..",
".."
);

var slnf = Path.Combine(testsFolderPath, "MockMe.Tests.slnf");

Thread.Sleep(5000);
Thread.Sleep(3000);

ProcessStartInfo cleanStartInfo = new() { FileName = "dotnet", Arguments = $"clean {slnf}" };
//ProcessStartInfo cleanStartInfo = new() { FileName = "dotnet", Arguments = $"clean {slnf}" };

//using Process clean =
// Process.Start(cleanStartInfo)
// ?? throw new InvalidOperationException("process must not be null");
//await clean.WaitForExitAsync();

ProcessStartInfo cleanStartInfo =
new()
{
FileName = "dotnet",
Arguments = $"build {Path.Combine(testsFolderPath, "..\\", "src", "MockMe")} -c Debug",
};

using Process clean =
Process.Start(cleanStartInfo)
?? throw new InvalidOperationException("process must not be null");
await clean.WaitForExitAsync();

var generatorBinPath = Path.Combine(
testsFolderPath,
"..",
"src",
"MockMe.Generator",
"bin",
"Debug",
"netstandard2.0"
);
foreach (var x in Directory.GetFiles(generatorBinPath))
{
Console.WriteLine(x);
}

//Assembly.LoadFrom(Path.Combine(generatorBinPath, "MockMe.Generator.dll"));

ProcessStartInfo buildStartInfo =
new() { FileName = "dotnet", Arguments = $"build {slnf} --no-incremental -c Debug" };

Expand Down

0 comments on commit ce21741

Please sign in to comment.