feat: DTOSS 7723 update BlobStorageHelper tests #14
Workflow file for this run
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 Unit Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| unit-tests: | |
| name: Run .NET Unit Tests | |
| runs-on: ubuntu-latest | |
| services: | |
| azurite: | |
| image: mcr.microsoft.com/azure-storage/azurite | |
| options: --entrypoint "azurite --silent --skipApiVersionCheck" | |
| env: | |
| AZURITE_BLOB_HOST: 0.0.0.0 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Ensure Azurite is Running | |
| run: | | |
| docker ps | |
| curl -v http://127.0.0.1:10000/devstoreaccount1 || echo "Azurite not reachable" | |
| - name: Verify Azurite is Running | |
| run: docker ps --filter "name=azurite-storage" | |
| - name: Restart Azurite with --skipApiVersionCheck | |
| run: | | |
| docker stop azurite-storage || true | |
| docker rm azurite-storage || true | |
| docker run -d --name azurite-storage \ | |
| -p 10000:10000 \ | |
| mcr.microsoft.com/azure-storage/azurite \ | |
| azurite --silent --skipApiVersionCheck | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' # Change as per your project needs | |
| - name: Run Unit Tests | |
| run: | | |
| make test-unit | |
| continue-on-error: true | |
| - name: View Test Results in Logs | |
| run: cat /home/runner/work/dtos-cohort-manager/dtos-cohort-manager/tests/UnitTests/SharedTests/BlobStorageHelperTests/TestResults/*.trx | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: /home/runner/work/dtos-cohort-manager/dtos-cohort-manager/tests/UnitTests/SharedTests/BlobStorageHelperTests/TestResults/*.trx # ✅ Correct path | |
| retention-days: 7 |