Skip to content
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
38 changes: 0 additions & 38 deletions .github/workflows/publish-github.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/publish-nuget.yml

This file was deleted.

100 changes: 100 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Publish

on:
push:
branches:
- master

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Cache NuGet
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget

- name: Restore
run: |
dotnet restore MathCore.Dataflow
dotnet restore Tests/MathCore.Dataflow.Tests

- name: Building
run: |
dotnet build MathCore.Dataflow -c Release --no-restore --nowarn:CS1998,CS8625,CS8600,CS8603,CS8620,CS8618,CS8604,CS8602,CS8622,CS8619,CS8632,CS0108,NU1701,NU1702,MSB3277,NU1701
dotnet build Tests/MathCore.Dataflow.Tests -c Release --no-restore

- name: Testing
run: dotnet test Tests/MathCore.Dataflow.Tests -c Release --no-build

- name: Packing
run: dotnet pack MathCore.Dataflow --no-build -c Release -v q -o ${{ github.workspace }}/ReleasePack --include-symbols

- name: Upload build artifacts
uses: actions/upload-artifact@v3.1.1
with:
name: Release
path: ${{ github.workspace }}/ReleasePack
retention-days: 1

nuget:
name: NuGet
needs: [build]
runs-on: ubuntu-latest

steps:
- name: Get artifact
uses: actions/download-artifact@v3.0.1
id: download
with:
name: Release
path: ${{ github.workspace }}/ReleasePack

- name: Upload to NuGet
run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.NuGetApiKey }} --skip-duplicate -s https://api.nuget.org/v3/index.json

github:
name: GitHub
needs: [build]
runs-on: ubuntu-latest

steps:
- name: Get artifact
uses: actions/download-artifact@v3.0.1
id: download
with:
name: Release
path: ${{ github.workspace }}/ReleasePack

- name: Upload to GitHub
run: dotnet nuget push "**/*.nupkg" --skip-duplicate -s https://nuget.pkg.github.com/Infarh/index.json -k ${{secrets.GITHUB_TOKEN}}

clean:
name: Clean artifact
needs: [nuget, github]
runs-on: ubuntu-latest

steps:
- name: Delete artefact
uses: geekyeggo/delete-artifact@v2
with:
name: Release
35 changes: 27 additions & 8 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,42 @@ name: Testing

on: [push]

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true

jobs:
test:
name: Test on .NET Core
build:
name: Build
runs-on: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
dotnet-version: 9.0.x

- name: Cache NuGet
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget

- name: Restore
run: |
dotnet restore MathCore.Dataflow
dotnet restore Tests/MathCore.Dataflow.Tests

- name: Building
run: |
dotnet build MathCore.Dataflow --nologo
dotnet build Tests/MathCore.Dataflow.Tests --nologo
dotnet build MathCore.Dataflow --no-restore
dotnet build Tests/MathCore.Dataflow.Tests --no-restore

- name: Run Tests
run: dotnet test Tests/MathCore.Dataflow.Tests --no-build --nologo
run: dotnet test Tests/MathCore.Dataflow.Tests --no-build
6 changes: 3 additions & 3 deletions MathCore.Dataflow/MathCore.Dataflow.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>0.0.3.1</Version>
<Version>0.0.4</Version>
<PackageReleaseNotes>
Коррекция работы метода When
</PackageReleaseNotes>
Expand All @@ -34,7 +34,7 @@
</PropertyGroup>

<ItemGroup>
<Using Include="System.Threading.Tasks.Dataflow"/>
<Using Include="System.Threading.Tasks.Dataflow" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand All @@ -46,7 +46,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="9.0.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Tests/ConsoleTests/ConsoleTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>preview</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
12 changes: 6 additions & 6 deletions Tests/MathCore.Dataflow.Tests/MathCore.Dataflow.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>preview</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Loading