Skip to content

Commit

Permalink
Net standard (#13)
Browse files Browse the repository at this point in the history
* update rdf.vocabularies

* paket magic mode

* conver Argolis.Models to netstandard

* argolis.hydra.nancy

* argolis.nancy

* getting closer to .net standard

* got to a state where command line builds and runs tests

* apply stylecop to test projects and fix build within VS

* fix borken tests

* correct urls and years in nuspecs

* start setting up cake

* call cake on CI

* remove version attributes from assembly.info files

* remove prerelease form cake build

* remove gitlink

* add mock to fix dotnet test

* replace integration tests with HttpClient client

* remove paket from projecy dependencies

* merge uritemplates into argolis.hydra

* update nancy,rdf

* tweak codecov steps
  • Loading branch information
tpluscode committed Apr 25, 2019
1 parent 3ae427e commit 92ec2da
Show file tree
Hide file tree
Showing 110 changed files with 1,781 additions and 2,855 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Expand Up @@ -229,11 +229,9 @@ FakesAssemblies/
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe

# FAKE - F# Make
.fake/
paket-files/
packages/
.Argolis_coverage.xml
coverage/
253 changes: 215 additions & 38 deletions .paket/Paket.Restore.targets

Large diffs are not rendered by default.

Binary file removed .paket/paket.bootstrapper.exe
Binary file not shown.
Binary file added .paket/paket.exe
Binary file not shown.
45 changes: 20 additions & 25 deletions Argolis.sln
Expand Up @@ -3,33 +3,32 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Argolis.Hydra", "src\Argolis.Hydra\Argolis.Hydra.csproj", "{F8B427F1-AEEB-481B-8D51-A53AF4EF0813}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Argolis.Hydra", "src\Argolis.Hydra\Argolis.Hydra.csproj", "{F8B427F1-AEEB-481B-8D51-A53AF4EF0813}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{00FB3ED0-0262-47E3-BC69-FC73C41746FA}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
appveyor.yml = appveyor.yml
src\Common.props = src\Common.props
build.cake = build.cake
paket.dependencies = paket.dependencies
paket.lock = paket.lock
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Argolis.Hydra.Nancy", "src\Argolis.Hydra.Nancy\Argolis.Hydra.Nancy.csproj", "{CBCAC4DC-129D-4F36-96D5-19B14F18CF18}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Argolis.Hydra.Nancy", "src\Argolis.Hydra.Nancy\Argolis.Hydra.Nancy.csproj", "{CBCAC4DC-129D-4F36-96D5-19B14F18CF18}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Argolis.Tests", "src\Argolis.Tests\Argolis.Tests.csproj", "{1167173B-16E1-4A0E-80D6-60A3E600E955}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Argolis.Tests", "src\Argolis.Tests\Argolis.Tests.csproj", "{1167173B-16E1-4A0E-80D6-60A3E600E955}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Example", "Example", "{23D3DC66-5EF3-40B4-82DA-F56906FE4249}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestHydraApi", "src\Examples\TestHydraApi\TestHydraApi.csproj", "{378AE219-5CEF-41ED-839A-1E8343754056}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Argolis.Tests.Integration", "src\Argolis.Tests.Integration\Argolis.Tests.Integration.csproj", "{41F8C2F5-8B83-430B-9AFE-21DCFD84AF54}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestNancyApp", "src\Examples\TestNancyApp\TestNancyApp.csproj", "{1D2E686F-381D-4700-B062-67AC029C0DAF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Argolis.Models", "src\Argolis.Models\Argolis.Models.csproj", "{3FADEBA7-BEA0-4864-B3FD-C17EAC737B35}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Argolis.Tests.Integration", "src\Argolis.Tests.Integration\Argolis.Tests.Integration.csproj", "{41F8C2F5-8B83-430B-9AFE-21DCFD84AF54}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Argolis.Nancy", "src\Argolis.Nancy\Argolis.Nancy.csproj", "{4EC11162-751B-4E73-A3C6-435BD7CAE9BA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Argolis.Models", "src\Argolis.Models\Argolis.Models.csproj", "{3FADEBA7-BEA0-4864-B3FD-C17EAC737B35}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestHydraApi", "src\Examples\TestHydraApi\TestHydraApi.csproj", "{B8B077FD-EC9C-4F28-90A9-C513DCAE4B57}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Argolis.Nancy", "src\Argolis.Nancy\Argolis.Nancy.csproj", "{4EC11162-751B-4E73-A3C6-435BD7CAE9BA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Argolis.Models.TunnelVisionLabs", "src\Argolis.Models.TunnelVisionLabs\Argolis.Models.TunnelVisionLabs.csproj", "{6AC20D75-35CF-4385-912E-BC7E381AD3A0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestHydraApp", "src\Examples\TestHydraApp\TestHydraApp.csproj", "{0BA22B8A-AB30-4DBD-9E8F-36AD6D266691}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -49,14 +48,6 @@ Global
{1167173B-16E1-4A0E-80D6-60A3E600E955}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1167173B-16E1-4A0E-80D6-60A3E600E955}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1167173B-16E1-4A0E-80D6-60A3E600E955}.Release|Any CPU.Build.0 = Release|Any CPU
{378AE219-5CEF-41ED-839A-1E8343754056}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{378AE219-5CEF-41ED-839A-1E8343754056}.Debug|Any CPU.Build.0 = Debug|Any CPU
{378AE219-5CEF-41ED-839A-1E8343754056}.Release|Any CPU.ActiveCfg = Release|Any CPU
{378AE219-5CEF-41ED-839A-1E8343754056}.Release|Any CPU.Build.0 = Release|Any CPU
{1D2E686F-381D-4700-B062-67AC029C0DAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D2E686F-381D-4700-B062-67AC029C0DAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D2E686F-381D-4700-B062-67AC029C0DAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D2E686F-381D-4700-B062-67AC029C0DAF}.Release|Any CPU.Build.0 = Release|Any CPU
{41F8C2F5-8B83-430B-9AFE-21DCFD84AF54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41F8C2F5-8B83-430B-9AFE-21DCFD84AF54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41F8C2F5-8B83-430B-9AFE-21DCFD84AF54}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -69,17 +60,21 @@ Global
{4EC11162-751B-4E73-A3C6-435BD7CAE9BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4EC11162-751B-4E73-A3C6-435BD7CAE9BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4EC11162-751B-4E73-A3C6-435BD7CAE9BA}.Release|Any CPU.Build.0 = Release|Any CPU
{6AC20D75-35CF-4385-912E-BC7E381AD3A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6AC20D75-35CF-4385-912E-BC7E381AD3A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6AC20D75-35CF-4385-912E-BC7E381AD3A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6AC20D75-35CF-4385-912E-BC7E381AD3A0}.Release|Any CPU.Build.0 = Release|Any CPU
{B8B077FD-EC9C-4F28-90A9-C513DCAE4B57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B8B077FD-EC9C-4F28-90A9-C513DCAE4B57}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B8B077FD-EC9C-4F28-90A9-C513DCAE4B57}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B8B077FD-EC9C-4F28-90A9-C513DCAE4B57}.Release|Any CPU.Build.0 = Release|Any CPU
{0BA22B8A-AB30-4DBD-9E8F-36AD6D266691}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0BA22B8A-AB30-4DBD-9E8F-36AD6D266691}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0BA22B8A-AB30-4DBD-9E8F-36AD6D266691}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0BA22B8A-AB30-4DBD-9E8F-36AD6D266691}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{378AE219-5CEF-41ED-839A-1E8343754056} = {23D3DC66-5EF3-40B4-82DA-F56906FE4249}
{1D2E686F-381D-4700-B062-67AC029C0DAF} = {23D3DC66-5EF3-40B4-82DA-F56906FE4249}
{B8B077FD-EC9C-4F28-90A9-C513DCAE4B57} = {23D3DC66-5EF3-40B4-82DA-F56906FE4249}
{0BA22B8A-AB30-4DBD-9E8F-36AD6D266691} = {23D3DC66-5EF3-40B4-82DA-F56906FE4249}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0E1EF9F5-9AD6-459A-8A90-589223A23014}
Expand Down
6 changes: 6 additions & 0 deletions NuGet.config
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
7 changes: 0 additions & 7 deletions after.Argolis.sln.targets

This file was deleted.

26 changes: 2 additions & 24 deletions appveyor.yml
@@ -1,30 +1,8 @@
image: Visual Studio 2017

install:
- choco install gitversion.portable -pre -y

before_build:
- .paket\paket.bootstrapper.exe prerelease
- .paket\paket.exe restore
- ps: gitversion /l console /output buildserver

build:
project: Argolis.sln

configuration: Release

after_build:
- .paket\paket.exe pack output nugets include-referenced-projects version %GitVersion_NuGetVersion%

after_test:
- .\packages\OpenCover\tools\OpenCover.Console.exe -register:user -target:"%xunit20%\xunit.console.x86.exe" -targetargs:"src\Argolis.Tests\bin\Release\Argolis.Tests.dll src\Argolis.Tests.Integration\bin\Release\Argolis.Tests.Integration.dll -noshadow -appveyor" -returntargetcode -filter:"+[Argolis*]* -[Argolis.Tests*]* -[Test*]*" -hideskipped:All -output:.\Argolis_coverage.xml
- "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
- pip install codecov
- codecov -f "Argolis_coverage.xml"
build_script:
- ps: .\build.ps1 -Target CI -verbosity Verbose -configuration Release

artifacts:
- path: 'nugets\*.nupkg'
- path: Argolis_coverage.xml

cache:
- packages -> paket.lock
Expand Down
115 changes: 115 additions & 0 deletions build.cake
@@ -0,0 +1,115 @@
#tool paket:?package=OpenCover
#tool paket:?package=codecov
#tool paket:?package=GitVersion.CommandLine
#addin paket:?package=Cake.Paket
#addin paket:?package=Cake.Codecov
var target = Argument("target", "Build");
var configuration = Argument("Configuration", "Debug");
GitVersion version;
Task("CI")
.IsDependentOn("Pack")
.IsDependentOn("Codecov").Does(() => {});
Task("Pack")
.IsDependentOn("Build")
.DoesForEach(GetFiles("./src/**/*.csproj"), path => {
var settings = new DotNetCorePackSettings {
Configuration = configuration,
OutputDirectory = "./nugets/",
NoBuild = true,
MSBuildSettings = new DotNetCoreMSBuildSettings()
};
settings.MSBuildSettings.Properties["version"] = new [] { version.NuGetVersion };
DotNetCorePack(path.FullPath, settings);
});

Task("GitVersion")
.Does(() => {
version = GitVersion(new GitVersionSettings {
UpdateAssemblyInfo = true,
});
if (BuildSystem.IsLocalBuild == false)
{
GitVersion(new GitVersionSettings {
OutputType = GitVersionOutput.BuildServer
});
}
});

Task("Restore")
.Does(() => {
DotNetCoreRestore(new DotNetCoreRestoreSettings {
Sources = new[] {
"https://api.nuget.org/v3/index.json",
"https://www.myget.org/F/tpluscode/api/v3/index.json"
},
});
});

Task("Build")
.IsDependentOn("GitVersion")
.IsDependentOn("Restore")
.Does(() => {
DotNetCoreBuild("Argolis.sln", new DotNetCoreBuildSettings {
Configuration = configuration
});
});

Task("Codecov")
.IsDependentOn("Test")
.Does(() => {
var buildVersion = string.Format("{0}.build.{1}",
version.FullSemVer,
BuildSystem.AppVeyor.Environment.Build.Number
);
var settings = new CodecovSettings {
Files = new[] { "./coverage/cobertura.xml" },
EnvironmentVariables = new Dictionary<string,string> { { "APPVEYOR_BUILD_VERSION", buildVersion } }
};
Codecov(settings);
});

Task("Test")
.IsDependentOn("Build")
.Does(RunTests("Argolis.tests"))
.Does(RunTests("Argolis.tests.Integration"))
.Does(() => {
DotCoverMerge(GetFiles("coverage\\*.dcvr"), "coverage\\merged.dcvr");
})
.Does(() => {
DotCoverReport(
"./coverage/merged.dcvr",
"./coverage/dotcover.xml",
new DotCoverReportSettings {
ReportType = DotCoverReportType.DetailedXML,
});
})
.Does(() => {
ReportGenerator("./coverage/dotcover.xml", "./coverage", new ReportGeneratorSettings() {
ReportTypes = new [] { ReportGeneratorReportType.Cobertura }
});
})
.DeferOnError();

public Action<ICakeContext> RunTests(string project)
{
var testSettings = new DotNetCoreTestSettings
{
Configuration = configuration,
NoBuild = true
};

return (ICakeContext c) =>
DotCoverCover(
(ICakeContext ctx) => ctx.DotNetCoreTest(GetFiles($"**\\{project}.csproj").Single().FullPath, testSettings),
$"./coverage/{project}.dcvr",
new DotCoverCoverSettings());
}

RunTarget(target);

0 comments on commit 92ec2da

Please sign in to comment.