|
|
|
@ -9,30 +9,8 @@ trigger:
|
|
|
|
|
- push
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- name: build-class
|
|
|
|
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
|
|
|
|
commands:
|
|
|
|
|
- cd Dames/Models
|
|
|
|
|
- dotnet restore Models.csproj
|
|
|
|
|
- dotnet build Models.csproj -c Release --no-restore
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: tests
|
|
|
|
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
|
|
|
|
commands:
|
|
|
|
|
- cd Dames/TestUnit
|
|
|
|
|
- dotnet restore TestUnit.csproj
|
|
|
|
|
- dotnet test TestUnit.csproj --no-restore
|
|
|
|
|
depends_on: [build-class]
|
|
|
|
|
|
|
|
|
|
- name: build-console
|
|
|
|
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
|
|
|
|
commands:
|
|
|
|
|
- cd Dames/Console
|
|
|
|
|
- dotnet restore Console.csproj
|
|
|
|
|
- dotnet build Console.csproj -c Release --no-restore
|
|
|
|
|
|
|
|
|
|
- name: code-inspection
|
|
|
|
|
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet8
|
|
|
|
|
secrets: [ SECRET_SONAR_LOGIN ]
|
|
|
|
@ -41,17 +19,9 @@ steps:
|
|
|
|
|
sonar_token:
|
|
|
|
|
from_secret: SECRET_SONAR_LOGIN
|
|
|
|
|
commands:
|
|
|
|
|
- cd Dames
|
|
|
|
|
- dotnet restore Models
|
|
|
|
|
- dotnet restore Console
|
|
|
|
|
- dotnet restore TestUnit
|
|
|
|
|
- dotnet sonarscanner begin /k:Jeu_de_dames /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="TestUnit","MauiApp1" /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
|
|
|
|
|
- dotnet build Console -c Release --no-restore
|
|
|
|
|
- dotnet build TestUnit -c Release --no-restore
|
|
|
|
|
- dotnet build Models -c Release --no-restore
|
|
|
|
|
- dotnet test TestUnit --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
|
|
|
|
|
- dotnet sonarscanner begin /k:WF-Website /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="" /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
|
|
|
|
|
|
|
|
|
|
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
|
|
|
|
|
- dotnet publish TestUnit -c Release --no-restore -o CI_PROJECT_DIR/build/release
|
|
|
|
|
- dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -59,8 +29,8 @@ steps:
|
|
|
|
|
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
|
|
|
|
|
failure: ignore
|
|
|
|
|
volumes:
|
|
|
|
|
- name: docs
|
|
|
|
|
path: /docs
|
|
|
|
|
- name:
|
|
|
|
|
path:
|
|
|
|
|
commands:
|
|
|
|
|
- /entrypoint.sh
|
|
|
|
|
when:
|
|
|
|
@ -69,4 +39,4 @@ steps:
|
|
|
|
|
event:
|
|
|
|
|
- push
|
|
|
|
|
- pull_request
|
|
|
|
|
depends_on: [build-class,build-console,tests]
|
|
|
|
|
depends_on: []
|
|
|
|
|