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