QuellCode/CentronERP war nur als Gitlink (Submodul-Referenz auf 79c1142) getrackt, ohne .gitmodules und ohne erreichbares Remote. Der Untersuchungsgegenstand der Versuchsreihe war damit nicht reproduzierbar gesichert: Ein Klon haette ein leeres Verzeichnis erhalten, und die Belege der 3.287 Anforderungen waeren nicht ueberpruefbar gewesen. Umstellung: - Historie nach c:\DEV\CentronERP_git_snapshot_79c1142 ausgelagert (vollstaendig lesbar, enthaelt 79c1142 und Vorgaenger 89ccfd6) - Gitlink aus dem Index entfernt - Dateiinhalt aufgenommen: 24.557 Dateien, rund 333 MB Die verschachtelte .gitignore der Codebasis gilt weiter, Build-Artefakte bleiben ausgeschlossen. Details in Versuche/Versuch_01/_Codebasis-Nachweis.md
106 lines
3.0 KiB
YAML
106 lines
3.0 KiB
YAML
name: Unit tests
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- 'release/**'
|
|
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'release/**'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# Supersede in-flight runs of this workflow for the same pull request. Pushes to main and
|
|
# release branches are excluded so every commit there still gets a full, recorded result.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
test:
|
|
name: ${{ matrix.display_name }}
|
|
runs-on: windows-2025
|
|
timeout-minutes: 120
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: backend-bl
|
|
display_name: Backend BL tests
|
|
project: .\tests\backend\Centron.Tests.BL\Centron.Tests.BL.csproj
|
|
results_directory: artifacts/tests/backend/bl
|
|
- name: backend-dao
|
|
display_name: Backend DAO tests
|
|
project: .\tests\backend\Centron.Tests.DAO\Centron.Tests.DAO.csproj
|
|
results_directory: artifacts/tests/backend/dao
|
|
- name: shared-core
|
|
display_name: Shared Core tests
|
|
project: .\tests\shared\Centron.Tests.Core\Centron.Tests.Core.csproj
|
|
results_directory: artifacts/tests/shared/core
|
|
- name: nexus
|
|
display_name: Nexus tests
|
|
project: .\tests\CentronNexusTests\CentronNexusTests.csproj
|
|
results_directory: artifacts/tests/nexus
|
|
|
|
env:
|
|
DOTNET_NOLOGO: true
|
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
|
CENTRON_BUILD_IS_DEV_BUILD: true
|
|
DevExpress_License: ${{ secrets.DEVEXPRESS_LICENSE }}
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up .NET SDK
|
|
uses: actions/setup-dotnet@v5
|
|
with:
|
|
dotnet-version: 10.0.x
|
|
|
|
- name: Verify .NET SDK
|
|
shell: pwsh
|
|
run: |
|
|
$sdkVersion = dotnet --version
|
|
|
|
if ($LASTEXITCODE -ne 0 -or $sdkVersion -notmatch '^10\.0\.') {
|
|
throw "Expected a .NET 10 SDK, but resolved '$sdkVersion'."
|
|
}
|
|
|
|
Write-Host "Resolved .NET SDK: $sdkVersion"
|
|
|
|
- name: Set build version
|
|
shell: pwsh
|
|
run: |
|
|
dotnet run `
|
|
--project ".\scripts\Centron.Scripts\Centron.Scripts.csproj" `
|
|
-- setup-versioning
|
|
|
|
- name: Run tests
|
|
shell: pwsh
|
|
run: |
|
|
dotnet test "${{ matrix.project }}" `
|
|
--configuration Release `
|
|
--framework net10.0 `
|
|
--logger "trx;LogFileName=TestResults.trx" `
|
|
--results-directory "${{ matrix.results_directory }}" `
|
|
-nodeReuse:false
|
|
|
|
- name: Upload test results
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: test-results-${{ matrix.name }}
|
|
path: ${{ matrix.results_directory }}/TestResults.trx
|
|
if-no-files-found: warn
|
|
retention-days: 14
|