Skip to content

Commit

Permalink
Merge branch 'release/1.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed Mar 18, 2022
2 parents 4b9ccbc + a03d400 commit 51e6f77
Show file tree
Hide file tree
Showing 10 changed files with 131 additions and 106 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: dotnet build

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x' #${{ matrix.dotnet-version }}
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}"
- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: dotnet-results-${{ matrix.dotnet-version }}
path: TestResults-${{ matrix.dotnet-version }}
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
24 changes: 24 additions & 0 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: dotnet package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x' # SDK Version to use.
# source-url: https://nuget.pkg.github.com/<owner>/index.json

- run: dotnet build
- name: Create the package
run: dotnet pack --include-symbols --include-source --configuration Release Terradue.OpenSearch.GeoJson/Terradue.OpenSearch.GeoJson.csproj
- name: Publish the package to Nuget
run: dotnet nuget push Terradue.OpenSearch.GeoJson/bin/Release/*.nupkg -s https://www.nuget.org/api/v2/package -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
- name: Publish the package to GPR
run: dotnet nuget push Terradue.OpenSearch.GeoJson/bin/Release/*.nupkg -s https://nuget.pkg.github.com/emmanuelmathot/index.json -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate

29 changes: 5 additions & 24 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,19 @@
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "shell",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"build",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
"/t:build",
"/restore:True"
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
// Reveal the output only if unrecognized errors occur.
"reveal": "silent"
},
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
},
{
"label": "pack",
"type": "shell",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true",
"/t:pack",
"/restore:True"
],
"group": "build",
"presentation": {
// Reveal the output only if unrecognized errors occur.
"reveal": "silent"
},
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
}
]
Expand Down
50 changes: 0 additions & 50 deletions Jenkinsfile

This file was deleted.

38 changes: 38 additions & 0 deletions Terradue.OpenSearch.GeoJson.Test/Startup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace Terradue.OpenSearch.GeoJson.Test
{
public class Startup
{
public IConfiguration Configuration { get; private set; }

public void ConfigureServices(IServiceCollection services)
{
Configuration = GetApplicationConfiguration();
services.AddLogging(builder =>
{
builder.AddConfiguration(Configuration.GetSection("Logging"));
});
services.AddOptions();
}

public void Configure(ILoggerFactory loggerfactory)
{
// loggerfactory.AddProvider(new XunitTestOutputLoggerProvider(accessor));
loggerfactory.AddLog4Net();
}

public IConfiguration GetApplicationConfiguration()
{
var builder = new ConfigurationBuilder()
.AddJsonFile("appsettings.json", optional: true)
.AddEnvironmentVariables()
.Build();

return builder;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Project ToolsVersion="Current" Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{0A38D877-708C-4092-91BB-8B89303EC56D}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Terradue.OpenSearch.GeoJson.Test</RootNamespace>
<AssemblyName>Terradue.OpenSearch.GeoJson.Test</AssemblyName>
<_ExtraTargetFrameworks Condition="'$(OS)' == 'Windows_NT' or '$(MSBuildRuntimeType)' == 'Mono'">net472</_ExtraTargetFrameworks>
<TargetFrameworks>netcoreapp2.1;$(RoslynPortableTargetFrameworks);$(_ExtraTargetFrameworks)</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<RuntimeIdentifiers>win;linux</RuntimeIdentifiers>
<PackageOutputPath>$(SolutionDir)\build</PackageOutputPath>
<RestorePackagesPath>$(SolutionDir)\packages</RestorePackagesPath>
<IsPackable>false</IsPackable>
<NoWarn>$(NoWarn);NU1605</NoWarn>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="System"/>
<Reference Include="System.Xml"/>
<Reference Include="System.Xml.Linq"/>
<Reference Include="System.Xml.Serialization"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Terradue.OpenSearch.GeoJson\Terradue.OpenSearch.GeoJson.csproj"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.*" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.*" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.*" />
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="3.1.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="NUnit" Version="3.12.0"/>
<PackageReference Include="NUnit.Runners" Version="3.10.0"/>
<PackageReference Include="NUnit.ConsoleRunner" Version="3.10.0"/>
<PackageReference Include="NUnit3TestAdapter" Version="3.16.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="Terradue.Metadata.EarthObservation" Version="1.6.6"/>
<PackageReference Include="log4net" Version="2.0.8"/>
<PackageReference Include="log4net" Version="2.0.11"/>
</ItemGroup>
</Project>
10 changes: 10 additions & 0 deletions Terradue.OpenSearch.GeoJson.Test/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"AllowedHosts": "*",
"Logging": {
"LogLevel": {
"Default": "Debug",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
16 changes: 16 additions & 0 deletions Terradue.OpenSearch.GeoJson.Test/log4net.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<log4net>
<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
<file value="test.log" />
<rollingStyle value="Date" />
<appendToFile value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level [%thread] %logger{1} - %message%newline" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="RollingFile" />
</root>
</log4net>
23 changes: 5 additions & 18 deletions Terradue.OpenSearch.GeoJson/Terradue.OpenSearch.GeoJson.csproj
Original file line number Diff line number Diff line change
@@ -1,39 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Project ToolsVersion="Current" Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{B932B7CD-4DDA-4084-AFBC-0FFCF4310C2E}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Terradue.OpenSearch.GeoJson</RootNamespace>
<AssemblyName>Terradue.OpenSearch.GeoJson</AssemblyName>
<_ExtraTargetFrameworks Condition="'$(OS)' == 'Windows_NT' or '$(MSBuildRuntimeType)' == 'Mono'">net472</_ExtraTargetFrameworks>
<TargetFrameworks>netstandard2.0;$(RoslynPortableTargetFrameworks);$(_ExtraTargetFrameworks)</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<RuntimeIdentifiers>win;linux</RuntimeIdentifiers>
<Title>DotNetOpenSearchGeoJson</Title>
<Description>Terradue.OpenSearch.GeoJson is a library targeting .NET 4.0 and above that provides an extension to Terradue.OpenSearch to query from a class or an URL from/to GeoJson format</Description>
<Description>Terradue.OpenSearch.GeoJson is a library targeting .NET standard that provides an extension to Terradue.OpenSearch to query from a class or an URL from/to GeoJson format</Description>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Version>1.4.5</Version>
<Version>1.5.0</Version>
<Authors>Emmanuel Mathot</Authors>
<Company>Terradue</Company>
<RepositoryUrl>https://github.com/Terradue/DotNetOpenSearchGeoJson</RepositoryUrl>
<PackageTags>OGC;Terradue;Opensearch;Json</PackageTags>
<PackageOutputPath>$(SolutionDir)\build</PackageOutputPath>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+net45;</AssetTargetFallback>
<NoWarn>$(NoWarn);NU1605</NoWarn>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="System"/>
<Reference Include="System.Core"/>
<Reference Include="System.Xml"/>
<Reference Include="System.Net"/>
<Reference Include="System.Runtime.Serialization"/>
<Reference Include="System.Xml.Linq"/>
<Reference Include="Microsoft.VisualBasic"/>
</ItemGroup>
<ItemGroup>
<Content Include="$(SolutionDir)\LICENSE" Pack="true" PackagePath=""/>
<Content Include="../LICENSE" Pack="true" PackagePath=""/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Terradue.OpenSearch" Version="1.17.5"/>
<PackageReference Include="Terradue.OpenSearch" Version="1.20.1"/>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3"/>
<PackageReference Include="Terradue.GeoJson" Version="1.12.0"/>
<PackageReference Include="HtmlAgilityPack" Version="1.11.12"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ public static FeatureResult FromOpenSearchResultItem(IOpenSearchResultItem resul

feature.Links = new Collection<SyndicationLink>(result.Links);

feature.sortKey = result.SortKey;

return feature;
}

Expand Down

0 comments on commit 51e6f77

Please sign in to comment.