forked from PHOENIXCONTACT/MORYX-Framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
947 additions
and
16 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<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"> | ||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ClassNeverInstantiated_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String> | ||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ClassNeverInstantiated_002ELocal/@EntryIndexedValue">DO_NOT_SHOW</s:String> | ||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestUseVarKeywordEverywhere/@EntryIndexedValue">DO_NOT_SHOW</s:String> | ||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestUseVarKeywordEvident/@EntryIndexedValue">DO_NOT_SHOW</s:String> | ||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SIMPLE_EMBEDDED_STATEMENT_STYLE/@EntryValue">LINE_BREAK</s:String> | ||
<s:Boolean x:Key="/Default/Environment/MemoryUsageIndicator/IsVisible/@EntryValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean> | ||
<s:Int64 x:Key="/Default/Environment/UnitTesting/ParallelProcessesCount/@EntryValue">2</s:Int64> | ||
</wpf:ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
################################ | ||
# Functions for Console Output # | ||
################################ | ||
|
||
function Write-Step([string]$step) { | ||
Write-Host "########################################################################################################" -foreground Magenta; | ||
Write-Host "#### $step" -foreground Magenta; | ||
Write-Host "########################################################################################################" -foreground Magenta | ||
} | ||
|
||
function Write-Variable ([string]$variableName, [string]$variableValue) { | ||
Write-Host ($variableName + " = " + $variableValue) | ||
} | ||
|
||
function Invoke-ExitCodeCheck([string]$exitCode) { | ||
if ([int]::Parse($exitCode) -gt 0) { | ||
Write-Host "This is the end, you know (ExitCode: $exitCode) - Lady, the plans we had went all wrong - We ain't nothing but fight and shout and tears." -ForegroundColor Red | ||
exit $exitCode; | ||
} | ||
} | ||
|
||
function Write-Host-Info([string]$message) { | ||
Write-Host $message | ||
} | ||
|
||
function Write-Host-Success([string]$message) { | ||
Write-Host $message -ForegroundColor Green | ||
} | ||
|
||
function Write-Host-Warning([string]$message) { | ||
Write-Host $message -ForegroundColor Yellow | ||
} | ||
|
||
function Write-Host-Error([string]$message) { | ||
Write-Host $message -ForegroundColor Red | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
### Summary | ||
|
||
<!-- | ||
Summarize the bug. Map the MR with Tickets from JIRA (by using the ticket id) | ||
--> | ||
|
||
### Relevant logs and/or screenshots | ||
|
||
<!-- | ||
Paste any relevant logs - please use code blocks (```) to format console output, | ||
logs, and code as it's very hard to read otherwise.) | ||
--> | ||
|
||
### Review | ||
|
||
<!-- | ||
The bullet points will be edited by the reviewer | ||
--> | ||
|
||
**Typical tasks** | ||
|
||
- [ ] Merge-Request is well described | ||
- [ ] Critical sections are *documented in code* | ||
- [ ] *Tests* are extended | ||
- [ ] *Documentation* is created / updated | ||
- [ ] Running in test environment | ||
|
||
**Clean code** | ||
|
||
- [ ] *All* unused references are removed | ||
- [ ] Clean code rules are respected with passion (naming, ...) | ||
- [ ] Avoid *copy and pasted* code snippets | ||
|
||
/label ~Bug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
### Summary | ||
|
||
<!-- | ||
Summarize the feature. Map the MR with Tickets from JIRA (by using the ticket id) | ||
--> | ||
|
||
### Relevant logs and/or screenshots | ||
|
||
<!-- | ||
Paste any relevant logs - please use code blocks (```) to format console output, | ||
logs, and code as it's very hard to read otherwise.) | ||
Paste images of the new features. | ||
--> | ||
|
||
### Review | ||
|
||
<!-- | ||
The bullet points will be edited by the reviewer | ||
--> | ||
|
||
**Typical tasks** | ||
|
||
- [ ] Merge-Request is well described | ||
- [ ] Added `Obsolete` attributes if necessary | ||
- [ ] Critical sections are *documented in code* | ||
- [ ] *Tests* available or extended | ||
- [ ] *Documentation* is created / updated | ||
- [ ] Running in test environment | ||
- [ ] *Manual* is created / updated | ||
|
||
**Clean code** | ||
|
||
- [ ] *All* unused references are removed | ||
- [ ] Clean code rules are respected with passion (naming, ...) | ||
- [ ] Avoid *copy and pasted* code snippets | ||
|
||
/label ~Feature |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: CI | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ dev ] | ||
pull_request: | ||
branches: [ dev ] | ||
|
||
env: | ||
MORYX_OPTIMIZE_CODE: "false" | ||
MORYX_BUILD_CONFIG: "Release" | ||
MORYX_BUILDNUMBER: ${{github.run_number}} | ||
MORYX_BRANCH: "dev" #TODO: ${{github.ref}} parse branch name | ||
MORYX_CODECOV_SECRET: ${{secrets.CODECOV_TOKEN}} | ||
MORYX_NUGET_APIKEY: ${{secrets.MYGET_TOKEN}} | ||
|
||
jobs: | ||
Build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup MSBuild | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: Setup NuGet.exe | ||
uses: NuGet/[email protected] | ||
|
||
- name: Build | ||
shell: pwsh | ||
run: ./Build.ps1 -Build | ||
Test: | ||
needs: [Build] | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup MSBuild | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: Setup NuGet.exe | ||
uses: NuGet/[email protected] | ||
|
||
- name: Execute Unit Tests | ||
shell: pwsh | ||
run: ./Build.ps1 -UnitTests | ||
|
||
- name: Execute Integration Tests | ||
shell: pwsh | ||
run: ./Build.ps1 -IntegrationTests | ||
|
||
- name: Cover Report | ||
shell: pwsh | ||
run: ./Build.ps1 -CoverReport | ||
|
||
- name: Upload test results | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: test-results | ||
path: artifacts/Tests | ||
Publish: | ||
needs: [Test] | ||
if: (github.event_name == 'push') | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup MSBuild | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: Setup NuGet.exe | ||
uses: NuGet/[email protected] | ||
|
||
- name: Set assembly versions | ||
shell: pwsh | ||
run: ./Build.ps1 -SetAssemblyVersion | ||
|
||
- name: Build | ||
shell: pwsh | ||
run: ./Build.ps1 -Build | ||
|
||
- name: Pack & Publish | ||
shell: pwsh | ||
run: ./Build.ps1 -Pack -Publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "PowerShell", | ||
"request": "launch", | ||
"name": "Build", | ||
"script": "${workspaceRoot}\\Build.ps1", | ||
"args": ["-Build"], | ||
"cwd": "${workspaceRoot}" | ||
}, | ||
{ | ||
"type": "PowerShell", | ||
"request": "launch", | ||
"name": "AssemblyVersion", | ||
"script": "${workspaceRoot}\\Build.ps1", | ||
"args": ["-SetAssemblyVersion"], | ||
"cwd": "${workspaceRoot}" | ||
}, | ||
{ | ||
"type": "PowerShell", | ||
"request": "launch", | ||
"name": "UnitTests", | ||
"script": "${workspaceRoot}\\Build.ps1", | ||
"args": ["-UnitTests"], | ||
"cwd": "${workspaceRoot}" | ||
}, | ||
{ | ||
"type": "PowerShell", | ||
"request": "launch", | ||
"name": "CoverReport", | ||
"script": "${workspaceRoot}\\Build.ps1", | ||
"args": ["-CoverReport"], | ||
"cwd": "${workspaceRoot}" | ||
}, | ||
{ | ||
"type": "PowerShell", | ||
"request": "launch", | ||
"name": "SystemTests", | ||
"script": "${workspaceRoot}\\Build.ps1", | ||
"args": ["-SystemTests"], | ||
"cwd": "${workspaceRoot}" | ||
}, | ||
{ | ||
"type": "PowerShell", | ||
"request": "launch", | ||
"name": "Nuget Pack", | ||
"script": "${workspaceRoot}\\Build.ps1", | ||
"args": ["-Pack"], | ||
"cwd": "${workspaceRoot}" | ||
} | ||
{ | ||
"type": "PowerShell", | ||
"request": "launch", | ||
"name": "Documentation", | ||
"script": "${workspaceRoot}\\Build.ps1", | ||
"args": ["-GenerateDocs"], | ||
"cwd": "${workspaceRoot}" | ||
} | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
param ( | ||
[switch]$SetAssemblyVersion, | ||
[switch]$Build, | ||
|
||
[switch]$SmokeTests, | ||
[switch]$UnitTests, | ||
[switch]$IntegrationTests, | ||
[switch]$SystemTests, | ||
|
||
[switch]$CoverReport, | ||
[switch]$GenerateDocs, | ||
|
||
[switch]$Pack, | ||
[switch]$Publish | ||
) | ||
|
||
# Load Toolkit | ||
. ".build\BuildToolkit.ps1" | ||
|
||
# Initialize Toolkit | ||
Invoke-Initialize -Version (Get-Content "VERSION"); | ||
|
||
if ($SetAssemblyVersion) { | ||
Set-AssemblyVersions; | ||
} | ||
|
||
if ($Build) { | ||
Invoke-Build ".\MoryxPlatform.sln" | ||
} | ||
|
||
if ($SmokeTests) { | ||
$runtimePath = "$RootPath\src\StartProject\bin\$env:MORYX_BUILD_CONFIG\StartProject.exe"; | ||
Invoke-SmokeTest $runtimePath 3 6000 | ||
} | ||
|
||
if ($UnitTests) { | ||
Invoke-CoverTests -SearchFilter "*.Tests.csproj" | ||
} | ||
|
||
if ($IntegrationTests) { | ||
Invoke-CoverTests -SearchFilter "*.IntegrationTests.csproj" | ||
} | ||
|
||
if ($SystemTests) { | ||
Invoke-Nunit -SearchFilter "*.SystemTests.csproj" | ||
} | ||
|
||
if ($CoverReport) { | ||
Invoke-CodecovUpload | ||
} | ||
|
||
if ($GenerateDocs) { | ||
Invoke-DocFx | ||
} | ||
|
||
if ($Pack) { | ||
Invoke-PackAll -Symbols | ||
} | ||
|
||
if ($Publish) { | ||
Invoke-Publish | ||
} | ||
|
||
Write-Host "Success!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageRestore> | ||
<!-- Allow NuGet to download missing packages --> | ||
<add key="enabled" value="True" /> | ||
|
||
<!-- Automatically check for missing packages during build in Visual Studio --> | ||
<add key="automatic" value="True" /> | ||
</packageRestore> | ||
|
||
<packageSources> | ||
<clear /> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> | ||
</packageSources> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.