mirror of
https://github.com/AlexMacocian/Sybil.git
synced 2026-07-15 15:19:59 +00:00
Introduce CI & CD pipelines
This commit is contained in:
@@ -0,0 +1,53 @@
|
|||||||
|
name: Sybil CD Pipeline
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
environment: Default
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
targetplatform: [x64]
|
||||||
|
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
Configuration: Release
|
||||||
|
Solution_Path: Sybil.sln
|
||||||
|
UnitTest_Project_Path: Sybil.UnitTests\Sybil.UnitTests.csproj
|
||||||
|
IntegrationTest_Project_Path: Sybil.IntegrationTests\Sybil.IntegrationTests.csproj
|
||||||
|
Source_Project_Path: Sybil\Sybil.csproj
|
||||||
|
Actions_Allow_Unsecure_Commands: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install .NET Core
|
||||||
|
uses: actions/setup-dotnet@v1
|
||||||
|
with:
|
||||||
|
dotnet-version: '6.0.x'
|
||||||
|
|
||||||
|
- name: Setup MSBuild.exe
|
||||||
|
uses: microsoft/setup-msbuild@v1.0.1
|
||||||
|
|
||||||
|
- name: Restore project
|
||||||
|
run: msbuild $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration /p:RuntimeIdentifier=$env:RuntimeIdentifier
|
||||||
|
env:
|
||||||
|
RuntimeIdentifier: win-${{ matrix.targetplatform }}
|
||||||
|
|
||||||
|
- name: Build Sybil project
|
||||||
|
run: dotnet build Sybil -c $env:Configuration
|
||||||
|
|
||||||
|
- name: Push nuget package
|
||||||
|
uses: brandedoutcast/publish-nuget@v2.5.5
|
||||||
|
with:
|
||||||
|
PROJECT_FILE_PATH: Sybil\Sybil.csproj
|
||||||
|
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
|
||||||
|
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
name: Sybil CI Pipeline
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
targetplatform: [x64]
|
||||||
|
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
Solution_Path: Sybil.sln
|
||||||
|
UnitTest_Project_Path: Sybil.UnitTests\Sybil.UnitTests.csproj
|
||||||
|
IntegrationTest_Project_Path: Sybil.IntegrationTests\Sybil.IntegrationTests.csproj
|
||||||
|
Source_Project_Path: Sybil\Sybil.csproj
|
||||||
|
Actions_Allow_Unsecure_Commands: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install .NET Core
|
||||||
|
uses: actions/setup-dotnet@v1
|
||||||
|
with:
|
||||||
|
dotnet-version: '6.0.x'
|
||||||
|
|
||||||
|
- name: Setup MSBuild.exe
|
||||||
|
uses: microsoft/setup-msbuild@v1.0.1
|
||||||
|
|
||||||
|
- name: Execute Unit Tests
|
||||||
|
run: dotnet test $env:UnitTest_Project_Path
|
||||||
|
|
||||||
|
- name: Execute Integration Tests
|
||||||
|
run: dotnet test $env:UnitTest_Project_Path
|
||||||
|
|
||||||
|
- name: Restore Project
|
||||||
|
run: msbuild $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration /p:RuntimeIdentifier=$env:RuntimeIdentifier
|
||||||
|
env:
|
||||||
|
Configuration: Debug
|
||||||
|
RuntimeIdentifier: win-${{ matrix.targetplatform }}
|
||||||
@@ -7,7 +7,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sybil", "Sybil\Sybil.csproj
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sybil.UnitTests", "Sybil.UnitTests\Sybil.UnitTests.csproj", "{458625E9-7427-47C6-BEE9-6269BDA00282}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sybil.UnitTests", "Sybil.UnitTests\Sybil.UnitTests.csproj", "{458625E9-7427-47C6-BEE9-6269BDA00282}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sybil.IntegrationTests", "Sybil.IntegrationTests\Sybil.IntegrationTests.csproj", "{4BE3F7BF-602C-447E-B29B-011AE7274E4A}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sybil.IntegrationTests", "Sybil.IntegrationTests\Sybil.IntegrationTests.csproj", "{4BE3F7BF-602C-447E-B29B-011AE7274E4A}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{5BF4022B-FF97-42AC-9CE7-B8D1913BD0F8}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{6028DE5F-4CA6-45C4-962F-F8C5B0BAE30D}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
.github\workflows\cd.yaml = .github\workflows\cd.yaml
|
||||||
|
.github\workflows\ci.yaml = .github\workflows\ci.yaml
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@@ -31,6 +39,9 @@ Global
|
|||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{6028DE5F-4CA6-45C4-962F-F8C5B0BAE30D} = {5BF4022B-FF97-42AC-9CE7-B8D1913BD0F8}
|
||||||
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {B97F59F1-BA0C-403C-9797-9BF8E107AEE7}
|
SolutionGuid = {B97F59F1-BA0C-403C-9797-9BF8E107AEE7}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
|||||||
Reference in New Issue
Block a user