Skip to content

FEATURE: New shortcuts 2023 1 #1777

FEATURE: New shortcuts 2023 1

FEATURE: New shortcuts 2023 1 #1777

Workflow file for this run

name: "Architect NUnit Tests"
on:
push:
branches: [ master ]
pull_request:
branches: [ master, 20* ]
jobs:
buildArchitect:
name: BuildArchitect
runs-on: windows-2022
permissions:
id-token: write
contents: read
checks: write
strategy:
fail-fast: false
matrix:
language: ['csharp']
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup msbuild
uses: microsoft/setup-msbuild@v1
- name: Build
run: |
msbuild backend/Origam.sln -t:restore /p:Configuration="Release Architect"
msbuild backend/Origam.sln /p:Configuration="Release Architect"
msbuild backend/Origam.sln -t:build /p:Configuration="Release Architect" /t:Common\Origam_CommonTests:Publish -v:m
- name: Upload testing artifact
uses: actions/upload-artifact@v2
with:
name: test-dlls
path: "backend/**Tests/bin/Release"
tests:
needs: buildArchitect
name: Tests
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
security-events: write
checks: write
strategy:
fail-fast: false
matrix:
language: ['csharp']
steps:
- name: Specify dotnet version to use
# We really want to specify the version the tests run on.
# The latest dotnet version is already installed that is why we can run "dotnet" now.
run: |
dotnet new globaljson --sdk-version 6.0.413
- name: Install dotnet
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Download testing artefact
uses: actions/download-artifact@v2
with:
name: test-dlls
path: backend
- name: Run NUnit tests
run: |
echo Linux platform is case sensitive filenames. For this reason it has to be renamed mvp.xml.dll to Mvp.Xml.dll.
find . -name 'mvp.xml.dll' -exec sh -c 'f="{}"; mv -- "$f" "$(dirname {})/mvp.xml.x.dll"' \;
find . -name 'mvp.xml.x.dll' -exec sh -c 'f="{}"; mv -- "$f" "$(dirname {})/Mvp.Xml.dll"' \;
dotnet test --logger "trx;logfilename=test-results.trx" backend/**Tests/bin/Release/*Tests.dll
- name: Produce NUnit test report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: NUnit Results
path: TestResults/test-results.trx
reporter: dotnet-trx
max-annotations: '0'
- name: Delete artifact
uses: geekyeggo/delete-artifact@v2
with:
name: test-dlls