chore: clean up awards API impl to match definition #88
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: User Management Tests | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| jobs: | |
| unit-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 #4.3.1 | |
| with: | |
| dotnet-version: "8.0.x" | |
| - name: Run Unit Tests | |
| shell: bash | |
| run: | | |
| cd user-management/tests/Stickerlandia.UserManagement.UnitTest | |
| dotnet test | |
| integration-test-azure: | |
| runs-on: ubuntu-latest | |
| needs: unit-test | |
| strategy: | |
| matrix: | |
| DRIVING: | |
| - ASPNET | |
| #- AZURE_FUNCTIONS | |
| fail-fast: false | |
| services: | |
| cosmosdb: | |
| image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview | |
| ports: | |
| - 8081:8081 | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 #4.3.1 | |
| with: | |
| dotnet-version: "8.0.x" | |
| - name: Export Cosmos DB Emulator Certificate | |
| run: | | |
| sudo apt update && sudo apt install -y openssl | |
| openssl s_client -connect localhost:8081 </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > cosmos_emulator.cert | |
| sudo cp cosmos_emulator.cert /usr/local/share/ca-certificates/ | |
| sudo update-ca-certificates | |
| - name: Install Azure Functions Core Tools | |
| run: | | |
| curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg | |
| sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg | |
| sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-$(lsb_release -cs 2>/dev/null)-prod $(lsb_release -cs 2>/dev/null) main" > /etc/apt/sources.list.d/dotnetdev.list' | |
| sudo apt-get update | |
| sudo apt-get install azure-functions-core-tools-4 | |
| func --version | |
| - name: .NET Restore | |
| shell: bash | |
| run: | | |
| cd user-management | |
| dotnet restore | |
| - name: .NET Build | |
| shell: bash | |
| run: | | |
| cd user-management | |
| dotnet build | |
| - name: Run Integration Tests | |
| shell: bash | |
| env: | |
| DRIVING: ${{ matrix.DRIVING }} | |
| DRIVEN: AZURE | |
| COSMOSDB_CONNECTION_STRING: ${{ secrets.COSMOSDB_LOCAL_CONNECTION_STRING }} | |
| run: | | |
| func --version | |
| cd user-management/tests/Stickerlandia.UserManagement.IntegrationTest && dotnet test --logger:"console;verbosity=detailed" | |
| integration-test-agnostic: | |
| runs-on: ubuntu-latest | |
| needs: unit-test | |
| strategy: | |
| matrix: | |
| DRIVING: | |
| - ASPNET | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 #4.3.1 | |
| with: | |
| dotnet-version: "8.0.x" | |
| - name: Install Azure Functions Core Tools | |
| run: | | |
| curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg | |
| sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg | |
| sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-$(lsb_release -cs 2>/dev/null)-prod $(lsb_release -cs 2>/dev/null) main" > /etc/apt/sources.list.d/dotnetdev.list' | |
| sudo apt-get update | |
| sudo apt-get install azure-functions-core-tools-4 | |
| func --version | |
| - name: .NET Restore | |
| shell: bash | |
| run: | | |
| cd user-management | |
| dotnet restore | |
| - name: .NET Build | |
| shell: bash | |
| run: | | |
| cd user-management | |
| dotnet build | |
| - name: Run Integration Tests | |
| shell: bash | |
| env: | |
| DRIVING: ${{ matrix.DRIVING }} | |
| DRIVEN: AGNOSTIC | |
| run: | | |
| cd user-management/tests/Stickerlandia.UserManagement.IntegrationTest && dotnet test --logger:"console;verbosity=detailed" |