Fix integration tests failing in CI due to QueueInitializerService (#56) #62
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: CI — Backend | |
| # Triggers on pushes and PRs that touch the backend directory. | |
| # Builds, tests (with coverage), and uploads a deployment artifact. | |
| # | |
| # Artifact produced: api-drop — consumed by cd-backend.yml | |
| on: | |
| push: | |
| branches: [main] | |
| paths: ['backend/**'] | |
| pull_request: | |
| branches: [main] | |
| paths: ['backend/**'] | |
| env: | |
| DOTNET_VERSION: '10.x' | |
| BUILD_CONFIG: Release | |
| SOLUTION: backend/SkillMatrixLlm.sln | |
| PROJECT: backend/src/SkillMatrixLlm.Api/SkillMatrixLlm.Api.csproj | |
| jobs: | |
| build-test-publish: | |
| name: Build, Test & Publish | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Start Azurite | |
| run: | | |
| docker run --detach \ | |
| --publish 10000:10000 \ | |
| --publish 10001:10001 \ | |
| --publish 10002:10002 \ | |
| mcr.microsoft.com/azure-storage/azurite \ | |
| azurite --skipApiVersionCheck \ | |
| --blobHost 0.0.0.0 \ | |
| --queueHost 0.0.0.0 \ | |
| --tableHost 0.0.0.0 | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Restore | |
| run: dotnet restore ${{ env.SOLUTION }} | |
| - name: Build | |
| run: dotnet build ${{ env.SOLUTION }} --configuration ${{ env.BUILD_CONFIG }} --no-restore | |
| - name: Test with coverage | |
| run: | | |
| dotnet test ${{ env.SOLUTION }} \ | |
| --configuration ${{ env.BUILD_CONFIG }} \ | |
| --no-build \ | |
| --collect:"XPlat Code Coverage" \ | |
| --results-directory coverage | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: coverage/**/coverage.cobertura.xml | |
| if-no-files-found: warn | |
| - name: Publish | |
| run: | | |
| dotnet publish ${{ env.PROJECT }} \ | |
| --configuration ${{ env.BUILD_CONFIG }} \ | |
| --no-build \ | |
| --output publish/api | |
| - name: Upload api-drop | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: api-drop | |
| path: publish/api |