I'm attempting to use the library in a Multi Tenant scenario where ea… #51
Workflow file for this run
This file contains 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: Release Package Version | |
on: | |
push: | |
tags: | |
- "**" | |
jobs: | |
unit_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- name: Setup .NET | |
uses: actions/setup-dotnet@main | |
with: | |
dotnet-version: | | |
8.0.x | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: | | |
dotnet build --configuration Release --no-restore | |
- name: Unit Tests | |
run: | | |
dotnet test --no-restore --verbosity normal --filter "Category!=Acceptance" | |
# acceptance_tests: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@main | |
# - name: Setup .NET | |
# uses: actions/setup-dotnet@main | |
# with: | |
# dotnet-version: | | |
# 8.0.x | |
# - name: Install dependencies | |
# run: dotnet restore | |
# - name: Build | |
# run: | | |
# dotnet build --configuration Release --no-restore | |
# - name: Prune databases | |
# working-directory: ./tools/CosmosTestHelper | |
# env: | |
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }} | |
# run: dotnet run | |
# - name: Test Functions | |
# env: | |
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }} | |
# run: | | |
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type!=Container&Type!=CosmosEventSourcing" | |
# - name: Prune databases | |
# working-directory: ./tools/CosmosTestHelper | |
# env: | |
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }} | |
# run: dotnet run | |
# - name: Test Cosmos Event Sourcing | |
# env: | |
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }} | |
# run: | | |
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=CosmosEventSourcing" | |
# - name: Prune databases | |
# working-directory: ./tools/CosmosTestHelper | |
# env: | |
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }} | |
# run: dotnet run | |
# - name: Test Container Creation | |
# env: | |
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }} | |
# run: | | |
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=Container" | |
deploy: | |
needs: | |
# - acceptance_tests | |
- unit_tests | |
if: github.event.base_ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
project: | |
- Microsoft.Azure.CosmosRepository | |
- Microsoft.Azure.CosmosRepository.AspNetCore | |
- Microsoft.Azure.CosmosEventSourcing | |
steps: | |
- name: Print tag ref | |
run: echo $GITHUB_REF | |
- name: Extract version number | |
uses: actions-ecosystem/action-regex-match@v2 | |
id: regex-match | |
with: | |
text: ${{ github.ref }} | |
regex: "([pre0-9.-]+)$" | |
- name: Print version number | |
run: echo '${{ steps.regex-match.outputs.match }}' | |
- uses: actions/checkout@main | |
- name: Setup .NET | |
uses: actions/setup-dotnet@main | |
with: | |
dotnet-version: | | |
8.0.x | |
- name: Restore ${{ matrix.project }} dependencies | |
run: dotnet restore ./src/${{ matrix.project }}/${{ matrix.project }}.csproj | |
- name: Build | |
run: | | |
dotnet build ./src/${{ matrix.project }}/${{ matrix.project }}.csproj --configuration Release --no-restore | |
- name: Pack ${{ matrix.project }} | |
if: ${{ matrix.project != 'Microsoft.Azure.CosmosEventSourcing' }} | |
run: | | |
dotnet pack ./src/${{ matrix.project }}/${{ matrix.project }}.csproj --output packages | |
- name: Pack ${{ matrix.project }} | |
if: ${{ matrix.project == 'Microsoft.Azure.CosmosEventSourcing' }} | |
run: | | |
dotnet pack ./src/${{ matrix.project }}/${{ matrix.project }}.csproj -p:PackageVersion='${{ steps.regex-match.outputs.match }}-pre1' --output packages | |
- name: Publish ${{ matrix.project }} package | |
run: | | |
nuget push **\*.nupkg -NoSymbols -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} | |
- name: Upload Package | |
uses: actions/upload-artifact@main | |
with: | |
name: ${{ matrix.project }}.v${{ steps.regex-match.outputs.match }} | |
path: packages/ |