mirror of
https://github.com/AlexMacocian/MTSC.git
synced 2026-07-15 14:59:33 +00:00
0fe9f9957c
* Setup OAuth2 support * Setup tests project * Setup OAuth2 unit tests in CI pipeline * Setup authorizeattribute tests * Test * Setup tests for AuthorizeAttribute * Setup OAuth2 support Unit Tests coverage * Add OAuth2 project to release
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: MTSC CI Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
matrix:
|
|
targetplatform: [x64]
|
|
|
|
runs-on: windows-latest
|
|
|
|
env:
|
|
Solution_Path: MTSC.sln
|
|
Test_Project_Path: MTSC.UnitTests\MTSC.UnitTests.csproj
|
|
Source_Project_Path: MTSC\MTSC.csproj
|
|
OAuth2Source_Project_Path: MTSC.OAuth2\MTSC.OAuth2.csproj
|
|
OAuth2Test_Project_Path: MTSC.OAuth2.Tests\MTSC.OAuth2.Tests.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.x.x'
|
|
|
|
- name: Setup MSBuild.exe
|
|
uses: microsoft/setup-msbuild@v1.0.1
|
|
|
|
- name: Execute Unit Tests
|
|
run: dotnet test $env:Test_Project_Path -v n --filter "TestCategory!=ServerTests"
|
|
|
|
- name: Execute OAuth2 Tests
|
|
run: dotnet test $env:OAuth2Test_Project_Path -v n
|
|
|
|
- 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 }} |