Skip to content

Commit

Permalink
Modernize project
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd committed Sep 24, 2022
1 parent 1663144 commit 6c083d8
Show file tree
Hide file tree
Showing 26 changed files with 2,653 additions and 97 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CD

on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
main:
name: CD
uses: zysharp/workflows/.github/workflows/cd.yaml@master
secrets:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
19 changes: 19 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
main:
name: CI
uses: zysharp/workflows/.github/workflows/ci.yaml@master
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
34 changes: 0 additions & 34 deletions .github/workflows/main.yml

This file was deleted.

Binary file modified Assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- https://devblogs.microsoft.com/nuget/introducing-central-package-management/ -->
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="3.1.2" />
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<PackageVersion Include="Microsoft.TestPlatform.ObjectModel" Version="17.3.1" />
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.5.109" PrivateAssets="all" />
<PackageVersion Include="Nullable" Version="1.3.1" PrivateAssets="all" />
<PackageVersion Include="xunit" Version="2.4.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageVersion Include="ZySharp.Validation" Version="1.2.6" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Florian Bernd
Copyright (c) 2022 Florian Bernd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
13 changes: 13 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<!-- https://devblogs.microsoft.com/nuget/introducing-package-source-mapping/ -->
<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# ZySharp Progress

![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)
[![GitHub Actions](https://github.com/flobernd/zysharp-progress/actions/workflows/main.yml/badge.svg)](https://github.com/flobernd/zysharp-progress/actions)
[![Build](https://github.com/zysharp/progress/actions/workflows/ci.yaml/badge.svg)](https://github.com/zysharp/progress/actions/workflows/ci.yaml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=zysharp_progress&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=zysharp_progress)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=zysharp_progress&metric=coverage)](https://sonarcloud.io/summary/new_code?id=zysharp_progress)
[![NuGet](https://img.shields.io/nuget/v/ZySharp.Progress.svg)](https://nuget.org/packages/ZySharp.Progress)
[![Nuget](https://img.shields.io/nuget/dt/ZySharp.Progress.svg)](https://nuget.org/packages/ZySharp.Progress)

Expand Down
21 changes: 16 additions & 5 deletions ZySharp.Progress.Examples/ZySharp.Progress.Examples.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>

<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestoreLockedMode Condition="'$(ContinuousIntegrationBuild)' == 'true'" />

<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPublishable>false</IsPublishable>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>

<EnableNETAnalyzers>true</EnableNETAnalyzers>
<NeutralLanguage>en</NeutralLanguage>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<ItemGroup>
<None Include="packages.lock.json" Visible="false" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ZySharp.Progress\ZySharp.Progress.csproj" />
</ItemGroup>

</Project>
</Project>
27 changes: 27 additions & 0 deletions ZySharp.Progress.Examples/packages.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"version": 2,
"dependencies": {
"net6.0": {
"JetBrains.Annotations": {
"type": "Transitive",
"resolved": "2022.1.0",
"contentHash": "ASfpoFJxiRsC9Xc4TWuPM41Zb/gl64xwfMOhnOZ3RnVWGYIZchjpWQV5zshJgoc/ZxVtgjaF7b577lURj7E6ig=="
},
"zysharp.progress": {
"type": "Project",
"dependencies": {
"ZySharp.Validation": "[1.2.6, )"
}
},
"ZySharp.Validation": {
"type": "CentralTransitive",
"requested": "[1.2.6, )",
"resolved": "1.2.6",
"contentHash": "nz8AfHi7E59k9ArgapYXG/UHQJNCGHW3LVcj/spHlKZErjMMvjDuzOoKiToqIZk2UtRnoYPR2XE4Nh9XlnM7KA==",
"dependencies": {
"JetBrains.Annotations": "2022.1.0"
}
}
}
}
}
42 changes: 31 additions & 11 deletions ZySharp.Progress.Tests/ZySharp.Progress.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,29 +1,49 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<TargetFrameworks>net4.8;netcoreapp3.1;net6.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>

<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<!-- https://github.com/NuGet/Home/issues/9195 -->
<!-- https://github.com/NuGet/Home/issues/10456 -->
<!-- https://github.com/dotnet/sdk/issues/26505 -->
<!--<RestoreLockedMode Condition="'$(ContinuousIntegrationBuild)' == 'true'" />-->
<!--<RuntimeIdentifiers>win7-x64</RuntimeIdentifiers>-->

<IsPublishable>false</IsPublishable>
<IsPackable>false</IsPackable>

<EnableNETAnalyzers>true</EnableNETAnalyzers>
<NeutralLanguage>en</NeutralLanguage>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<None Include="packages.lock.json" Visible="false" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<!-- https://github.com/microsoft/vstest/issues/2469 -->
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Condition="$(TargetFramework.StartsWith('net4')) AND '$(OS)' == 'Unix'" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Condition="'$(TargetFramework)' == 'net4.8'" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ZySharp.Progress\ZySharp.Progress.csproj" />
</ItemGroup>
Expand Down
Loading

0 comments on commit 6c083d8

Please sign in to comment.