Skip to content

Commit b639460

Browse files
author
Mykyta Zotov
committed
Initial commit
1 parent 1816537 commit b639460

31 files changed

Lines changed: 7912 additions & 0 deletions

.github/workflows/ci-cd.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
release:
9+
types: [ published ]
10+
11+
jobs:
12+
# CI Job - runs on every push and PR
13+
build-and-test:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v4
22+
with:
23+
dotnet-version: '8.0.x'
24+
25+
- name: Restore dependencies
26+
run: dotnet restore
27+
28+
- name: Build
29+
run: dotnet build --configuration Release --no-restore
30+
31+
- name: Run tests
32+
run: dotnet test --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage"
33+
34+
- name: Upload coverage reports
35+
uses: codecov/codecov-action@v4
36+
if: success()
37+
with:
38+
files: '**/coverage.cobertura.xml'
39+
flags: unittests
40+
name: codecov-umbrella
41+
fail_ci_if_error: false
42+
43+
# CD Job - runs only on release
44+
publish:
45+
runs-on: ubuntu-latest
46+
needs: build-and-test
47+
if: github.event_name == 'release'
48+
49+
steps:
50+
- name: Checkout code
51+
uses: actions/checkout@v4
52+
53+
- name: Setup .NET
54+
uses: actions/setup-dotnet@v4
55+
with:
56+
dotnet-version: '8.0.x'
57+
58+
- name: Restore dependencies
59+
run: dotnet restore
60+
61+
- name: Build
62+
run: dotnet build --configuration Release --no-restore
63+
64+
- name: Run tests
65+
run: dotnet test --configuration Release --no-build --verbosity normal
66+
67+
- name: Extract version from tag
68+
id: get_version
69+
run: |
70+
# Remove 'v' prefix if present
71+
VERSION=${GITHUB_REF#refs/tags/v}
72+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
73+
echo "Package version: $VERSION"
74+
75+
- name: Pack
76+
run: dotnet pack src/Intervals.NET/Intervals.NET.csproj --configuration Release --no-build --output ./artifacts /p:PackageVersion=${{ steps.get_version.outputs.VERSION }}
77+
78+
- name: Push to NuGet
79+
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
80+
81+
- name: Upload artifacts
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: nuget-package-${{ steps.get_version.outputs.VERSION }}
85+
path: ./artifacts/*.nupkg

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bin/
2+
obj/
3+
/packages/
4+
riderModule.iml
5+
/_ReSharper.Caches/

.idea/.idea.Intervals.NET/.idea/.gitignore

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.Intervals.NET/.idea/copilot.data.migration.ask2agent.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.Intervals.NET/.idea/encodings.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.Intervals.NET/.idea/indexLayout.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.Intervals.NET/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Intervals.NET.sln

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Intervals.NET", "src\Intervals.NET\Intervals.NET.csproj", "{A2F7DF66-08BE-438A-A354-C09499B8B8B7}"
4+
EndProject
5+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{5D2B78C6-39CB-44C2-9E02-57CE792FEC93}"
6+
ProjectSection(SolutionItems) = preProject
7+
README.md = README.md
8+
.github\workflows\ci-cd.yml = .github\workflows\ci-cd.yml
9+
EndProjectSection
10+
EndProject
11+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EAF02F30-A5E4-4237-B402-6F946F2B2C09}"
12+
EndProject
13+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{28A5727D-3EDB-4F19-8B68-1DBD790EB8E2}"
14+
EndProject
15+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Intervals.NET.Tests", "tests\Intervals.NET.Tests\Intervals.NET.Tests.csproj", "{8703AF16-1CD4-40CF-81B4-3579FDF858EF}"
16+
EndProject
17+
Global
18+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
19+
Debug|Any CPU = Debug|Any CPU
20+
Release|Any CPU = Release|Any CPU
21+
EndGlobalSection
22+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
23+
{A2F7DF66-08BE-438A-A354-C09499B8B8B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{A2F7DF66-08BE-438A-A354-C09499B8B8B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{A2F7DF66-08BE-438A-A354-C09499B8B8B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{A2F7DF66-08BE-438A-A354-C09499B8B8B7}.Release|Any CPU.Build.0 = Release|Any CPU
27+
{8703AF16-1CD4-40CF-81B4-3579FDF858EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28+
{8703AF16-1CD4-40CF-81B4-3579FDF858EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
29+
{8703AF16-1CD4-40CF-81B4-3579FDF858EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
30+
{8703AF16-1CD4-40CF-81B4-3579FDF858EF}.Release|Any CPU.Build.0 = Release|Any CPU
31+
EndGlobalSection
32+
GlobalSection(NestedProjects) = preSolution
33+
{A2F7DF66-08BE-438A-A354-C09499B8B8B7} = {EAF02F30-A5E4-4237-B402-6F946F2B2C09}
34+
{8703AF16-1CD4-40CF-81B4-3579FDF858EF} = {28A5727D-3EDB-4F19-8B68-1DBD790EB8E2}
35+
EndGlobalSection
36+
EndGlobal

Intervals.NET.sln.DotSettings.user

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIFormattable_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FUSER_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FSourcesCache_003F243a037ca7a04510a506adfdd94befbac90930_003F_005F4559d_003FIFormattable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
3+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AISpanFormattable_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FUsers_003FUSER_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FSourcesCache_003F243a037ca7a04510a506adfdd94befbac90930_003F_005F51818_003FISpanFormattable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
4+
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=36485107_002D39a7_002D464b_002Da6f7_002Db7be5b079cfd/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" Name="All tests from &amp;lt;tests&amp;gt;" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;&#xD;
5+
&lt;Project Location="C:\code\Intervals.NET" Presentation="&amp;lt;tests&amp;gt;" /&gt;&#xD;
6+
&lt;/SessionState&gt;</s:String>
7+
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=88c93351_002Dbc3e_002D4531_002Dadcd_002D9e42978da2d0/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from &amp;lt;tests&amp;gt; #2" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;&#xD;
8+
&lt;Project Location="C:\code\Intervals.NET" Presentation="&amp;lt;tests&amp;gt;" /&gt;&#xD;
9+
&lt;/SessionState&gt;</s:String>
10+
11+
12+
13+
14+
</wpf:ResourceDictionary>

0 commit comments

Comments
 (0)