fix: postgresql plus optimisation #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: .NET API Tests & Build | |
| on: | |
| push: | |
| branches: [ Prod, Dev ] | |
| pull_request: | |
| branches: [ Prod, Dev ] | |
| # AJOUTE CES LIGNES ICI : | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| dotnet-version: ['10.0.x'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET ${{ matrix.dotnet-version }} | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| include-prerelease: true | |
| - name: Restore dependencies | |
| run: | | |
| dotnet restore TableMasterApi/TableMasterApi.csproj | |
| dotnet restore TableMasterApi.Tests/TableMasterApi.Tests.csproj | |
| - name: Build | |
| run: | | |
| dotnet build TableMasterApi/TableMasterApi.csproj --no-restore --configuration Release | |
| dotnet build TableMasterApi.Tests/TableMasterApi.Tests.csproj --no-restore --configuration Release | |
| - name: Run Unit Tests | |
| run: > | |
| dotnet test TableMasterApi.Tests/TableMasterApi.Tests.csproj | |
| --no-build | |
| --configuration Release | |
| --verbosity normal | |
| --logger "trx;LogFileName=test-results.trx" | |
| - name: Upload Test Results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: '**/test-results.trx' | |
| # On publie uniquement l'API | |
| - name: Publish API | |
| run: dotnet publish TableMasterApi/TableMasterApi.csproj -c Release -o ./publish --no-build | |
| - name: Upload Build Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: api-build | |
| path: ./publish/ | |
| - name: Test Report | |
| if: always() | |
| uses: dorny/test-reporter@v1 | |
| with: | |
| name: .NET Test Results | |
| path: '**/test-results.trx' | |
| reporter: 'dotnet-trx' |