1
0

Improved CI file

This commit is contained in:
2025-11-13 08:23:16 +01:00
parent 9edb35c015
commit 1096186c40

View File

@@ -21,19 +21,11 @@ build-debug:
rules:
- if: $CI_COMMIT_TAG == null
script:
- dotnet restore --no-cache --force
- dotnet build -c Debug --nologo --no-restore --no-incremental
- shopt -s globstar
- mkdir ./artifacts
- mv ./src/AMWD.Common/bin/Debug/*.nupkg ./artifacts/
- mv ./src/AMWD.Common/bin/Debug/*.snupkg ./artifacts/
- mv ./src/AMWD.Common.AspNetCore/bin/Debug/*.nupkg ./artifacts/
- mv ./src/AMWD.Common.AspNetCore/bin/Debug/*.snupkg ./artifacts/
- mv ./src/AMWD.Common.EntityFrameworkCore/bin/Debug/*.nupkg ./artifacts/
- mv ./src/AMWD.Common.EntityFrameworkCore/bin/Debug/*.snupkg ./artifacts/
- mv ./src/AMWD.Common.MessagePack/bin/Debug/*.nupkg ./artifacts/
- mv ./src/AMWD.Common.MessagePack/bin/Debug/*.snupkg ./artifacts/
- mv ./src/AMWD.Common.Test/bin/Debug/*.nupkg ./artifacts/
- mv ./src/AMWD.Common.Test/bin/Debug/*.snupkg ./artifacts/
- dotnet build -c Debug --nologo
- mv ./**/*.nupkg ./artifacts/
- mv ./**/*.snupkg ./artifacts/
artifacts:
paths:
- artifacts/*.nupkg
@@ -50,14 +42,13 @@ test-debug:
- 64bit
rules:
- if: $CI_COMMIT_TAG == null
#coverage: /Line coverage[\s\S].+%/
coverage: /Branch coverage[\s\S].+%/
before_script:
- dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools
script:
- dotnet restore --no-cache --force
- dotnet test -c Debug --nologo --no-restore /p:CoverletOutputFormat=Cobertura
- dotnet test -c Debug --nologo /p:CoverletOutputFormat=Cobertura
- /dotnet-tools/reportgenerator "-reports:${CI_PROJECT_DIR}/**/coverage.cobertura.xml" "-targetdir:/reports" -reportType:TextSummary
after_script:
- cat /reports/Summary.txt
artifacts:
when: always
@@ -90,19 +81,11 @@ build-release:
rules:
- if: $CI_COMMIT_TAG != null
script:
- dotnet restore --no-cache --force
- dotnet build -c Release --nologo --no-restore --no-incremental
- shopt -s globstar
- mkdir ./artifacts
- mv ./src/AMWD.Common/bin/Release/*.nupkg ./artifacts/
- mv ./src/AMWD.Common/bin/Release/*.snupkg ./artifacts/
- mv ./src/AMWD.Common.AspNetCore/bin/Release/*.nupkg ./artifacts/
- mv ./src/AMWD.Common.AspNetCore/bin/Release/*.snupkg ./artifacts/
- mv ./src/AMWD.Common.EntityFrameworkCore/bin/Release/*.nupkg ./artifacts/
- mv ./src/AMWD.Common.EntityFrameworkCore/bin/Release/*.snupkg ./artifacts/
- mv ./src/AMWD.Common.MessagePack/bin/Release/*.nupkg ./artifacts/
- mv ./src/AMWD.Common.MessagePack/bin/Release/*.snupkg ./artifacts/
- mv ./src/AMWD.Common.Test/bin/Release/*.nupkg ./artifacts/
- mv ./src/AMWD.Common.Test/bin/Release/*.snupkg ./artifacts/
- dotnet build -c Release --nologo
- mv ./**/*.nupkg ./artifacts/
- mv ./**/*.snupkg ./artifacts/
artifacts:
paths:
- artifacts/*.nupkg
@@ -119,14 +102,13 @@ test-release:
- 64bit
rules:
- if: $CI_COMMIT_TAG != null
#coverage: /Line coverage[\s\S].+%/
coverage: /Branch coverage[\s\S].+%/
before_script:
- dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools
script:
- dotnet restore --no-cache --force
- dotnet test -c Release --nologo --no-restore /p:CoverletOutputFormat=Cobertura
- dotnet test -c Release --nologo /p:CoverletOutputFormat=Cobertura
- /dotnet-tools/reportgenerator "-reports:${CI_PROJECT_DIR}/**/coverage.cobertura.xml" "-targetdir:/reports" -reportType:TextSummary
after_script:
- cat /reports/Summary.txt
artifacts:
when: always