Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include net5.0 into build #5

Merged
merged 1 commit into from
Mar 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: release
on:
push:
tags:
- 'v*'
jobs:
release:

runs-on: ubuntu-latest

steps:
- name: Set RELEASE_VERSION
run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:11}) #GITHUB_REF:11 skips first 11 characters of GITHUB_REF (GITHUB_REF will look like 'refs/tags/v*.*.*')
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.*
- name: Pack
run: dotnet pack --output ./artifacts --configuration Release -p:Version=$RELEASE_VERSION
- name: Publish packages
run: dotnet nuget push ./artifacts/**.nupkg --source nuget.org --api-key ${{secrets.NUGET_TOKEN}}
30 changes: 30 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: test

on:
pull_request:
branches: master
types: [synchronize, opened, reopened, ready_for_review, unlabeled]
paths-ignore:
- 'README.md'
push:
branches: master
paths-ignore:
- 'README.md'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.*
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
10 changes: 7 additions & 3 deletions MockHttpClient.sln
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.16
# Visual Studio Version 16
VisualStudioVersion = 16.0.31112.23
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{192BC768-A7C9-42E6-8766-0CCC78B9C7F2}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
README.md = README.md
.github\workflows\release.yaml = .github\workflows\release.yaml
.github\workflows\test.yaml = .github\workflows\test.yaml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7D67DA01-667D-411F-A222-1757A12ACFC7}"
Expand Down Expand Up @@ -39,4 +40,7 @@ Global
{DCC322E6-693C-4B5B-B7FE-3D3A3C9FB072} = {7D67DA01-667D-411F-A222-1757A12ACFC7}
{AD86A4EA-5799-4101-8B09-9774BD31F0A7} = {8E8E7355-5E6A-447C-B20E-8E864BA736F4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {908DC24D-C669-44B3-B06F-8C04563AF94F}
EndGlobalSection
EndGlobal
33 changes: 0 additions & 33 deletions appveyor.yml

This file was deleted.

16 changes: 5 additions & 11 deletions src/MockHttpClient/MockHttpClient.csproj
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard1.4;net462</TargetFrameworks>
<TargetFrameworks>netstandard1.4;net462;net5.0</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>1.0.1</Version>
<Authors>Alex Davies</Authors>
<Authors>Alex Davies</Authors>
<Company>Codecutout</Company>
<Description>Easily mock HttpClient with canned responses to make testing easier</Description>
<PackageLicenseUrl>https://github.com/codecutout/MockHttpClient/blob/master/LICENSE</PackageLicenseUrl>
<License>https://github.com/codecutout/MockHttpClient/blob/master/LICENSE</License>
<PackageProjectUrl>https://github.com/codecutout/MockHttpClient</PackageProjectUrl>
<PackageTags>MockHttpClient Mock Fake HttpClient HttpMessageHandler</PackageTags>
<AssemblyVersion>1.0.1.0</AssemblyVersion>
<FileVersion>1.0.1.0</FileVersion>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="System.Xml.XmlSerializer" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.Net.Http" />
</ItemGroup>

Expand Down
6 changes: 1 addition & 5 deletions tests/MockHttpClient.Test/MockHttpClient.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -18,8 +18,4 @@
<ProjectReference Include="..\..\src\MockHttpClient\MockHttpClient.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="System.Net.Http" />
</ItemGroup>

</Project>