Move all ravendb specific ID generation out of the shared project #9479
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 | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - release-* | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| DOTNET_NOLOGO: true | |
| defaults: | |
| run: | |
| shell: pwsh | |
| jobs: | |
| build: | |
| name: ${{ matrix.os-name }}-${{ matrix.test-category }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [windows-latest, ubuntu-latest] | |
| test-category: [ Default, SqlServer, SqlServerPersistence, AzureServiceBus, RabbitMQ, AzureStorageQueues, MSMQ, SQS, PrimaryRavenAcceptance, PrimaryRavenPersistence, PostgreSQL, PostgreSQLPersistence, IBMMQ ] | |
| include: | |
| - os: windows-latest | |
| os-name: Windows | |
| - os: ubuntu-latest | |
| os-name: Linux | |
| exclude: | |
| - os: ubuntu-latest | |
| test-category: MSMQ | |
| - os: windows-latest | |
| test-category: IBMMQ | |
| fail-fast: false | |
| steps: | |
| - name: Check for secrets | |
| env: | |
| SECRETS_AVAILABLE: ${{ secrets.SECRETS_AVAILABLE }} | |
| run: exit $(If ($env:SECRETS_AVAILABLE -eq 'true') { 0 } Else { 1 }) | |
| - name: Checkout | |
| uses: actions/checkout@v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v6.0.0 | |
| with: | |
| global-json-file: global.json | |
| - name: Download RavenDB Server | |
| run: ./tools/download-ravendb-server.ps1 | |
| - name: Build | |
| run: dotnet build src --configuration Release -graph | |
| - name: Zip PowerShell module | |
| run: | | |
| New-Item assets\PowerShellModules -ItemType Directory | |
| Compress-Archive -Path deploy\PowerShellModules\Particular.ServiceControl.Management\* -DestinationPath assets\PowerShellModules\Particular.ServiceControl.Management.zip | |
| - name: Upload assets | |
| uses: actions/upload-artifact@v7.0.1 | |
| if: matrix.test-category == 'Default' | |
| with: | |
| name: ${{ matrix.os-name }}-assets | |
| path: | | |
| nugets/ | |
| zip/ | |
| assets/ | |
| retention-days: 1 | |
| - name: Smoke test PowerShell module import | |
| if: matrix.os-name == 'Windows' | |
| run: Import-Module ./deploy/PowerShellModules/Particular.ServiceControl.Management | |
| # there is an issue with az cli and python 3.14, so for now we need to pin it | |
| # once the issue is resolved it should be able to be re-floated | |
| # https://github.com/Azure/azure-cli/issues/32980 | |
| - name: Set Python 3.13 (Linux) | |
| if: matrix.os-name == 'Linux' && matrix.test-category == 'AzureServiceBus' | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install pinned Azure CLI on Python 3.13 (Linux) | |
| if: matrix.os-name == 'Linux' && matrix.test-category == 'AzureServiceBus' | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install --user "azure-cli==2.64.0" | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| - name: Azure login | |
| uses: azure/login@v3.0.0 | |
| if: matrix.test-category == 'AzureServiceBus' || matrix.test-category == 'AzureStorageQueues' || matrix.test-category == 'RabbitMQ' || matrix.test-category == 'PostgreSQL' || matrix.test-category == 'PostgreSQLPersistence' | |
| with: | |
| creds: ${{ secrets.AZURE_ACI_CREDENTIALS }} | |
| - name: Setup SQL Server | |
| uses: Particular/install-sql-server-action@v1.5.0 | |
| if: matrix.test-category == 'SqlServer' | |
| with: | |
| connection-string-env-var: ServiceControl_TransportTests_SQL_ConnectionString | |
| catalog: nservicebus | |
| - name: Setup SQL Server persistence | |
| uses: Particular/install-sql-server-action@v1.5.0 | |
| if: matrix.test-category == 'SqlServerPersistence' | |
| with: | |
| connection-string-env-var: ServiceControl_Persistence_SqlServer_ConnectionString | |
| catalog: ServiceControl | |
| enable-full-text-search: true | |
| - name: Setup PostgreSQL | |
| uses: Particular/setup-postgres-action@v1.1.0 | |
| if: matrix.test-category == 'PostgreSQL' | |
| with: | |
| connection-string-name: ServiceControl_TransportTests_PostgreSQL_ConnectionString | |
| tag: ServiceControl | |
| registry-username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| registry-password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Setup PostgreSQL persistence | |
| uses: Particular/setup-postgres-action@v1.1.0 | |
| if: matrix.test-category == 'PostgreSQLPersistence' | |
| with: | |
| connection-string-name: ServiceControl_Persistence_PostgreSql_ConnectionString | |
| tag: ServiceControl | |
| registry-username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| registry-password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Setup RabbitMQ | |
| uses: Particular/setup-rabbitmq-action@v1.7.1 | |
| if: matrix.test-category == 'RabbitMQ' | |
| with: | |
| connection-string-name: ServiceControl_TransportTests_RabbitMQ_ConnectionString | |
| tag: ServiceControl | |
| registry-username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| registry-password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Setup Azure Service Bus | |
| uses: Particular/setup-azureservicebus-action@v2.5.0 | |
| if: matrix.test-category == 'AzureServiceBus' | |
| with: | |
| connection-string-name: ServiceControl_TransportTests_ASBS_ConnectionString | |
| azure-credentials: ${{ secrets.AZURE_ACI_CREDENTIALS }} | |
| tag: ServiceControl | |
| - name: Setup Azure Storage Queues | |
| uses: Particular/setup-azurestorage-action@v2.0.0 | |
| if: matrix.test-category == 'AzureStorageQueues' | |
| with: | |
| connection-string-name: ServiceControl_TransportTests_ASQ_ConnectionString | |
| azure-credentials: ${{ secrets.AZURE_ACI_CREDENTIALS }} | |
| tag: ServiceControl | |
| - name: Setup IBM MQ | |
| if: matrix.test-category == 'IBMMQ' | |
| run: | | |
| docker run --name ibmmq -d -p 1414:1414 -p 9443:9443 ` | |
| --health-cmd "dspmq" --health-interval 10s --health-timeout 5s --health-retries 10 --health-start-period 30s ` | |
| -e LICENSE=accept -e MQ_QMGR_NAME=QM1 -e MQ_ADMIN_PASSWORD=passw0rd ` | |
| icr.io/ibm-messaging/mq:latest | |
| # Wait for container health check to pass | |
| while ((docker inspect --format '{{.State.Health.Status}}' ibmmq) -ne 'healthy') { | |
| Start-Sleep -Seconds 2 | |
| } | |
| echo "ServiceControl_TransportTests_IBMMQ_ConnectionString=mq://admin:passw0rd@localhost:1414/QM1?channel=DEV.ADMIN.SVRCONN&topicprefix=DEV" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
| - name: Setup SQS environment variables | |
| if: matrix.test-category == 'SQS' | |
| run: | | |
| echo "AWS_REGION=${{ secrets.AWS_REGION }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
| echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
| echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
| # Cleanup of queues starting with `GHA-` handled by https://github.com/Particular/NServiceBus.AmazonSQS/blob/master/.github/workflows/tests-cleanup.yml | |
| $connectString = "AccessKeyId=${{ secrets.AWS_ACCESS_KEY_ID }};SecretAccessKey=${{ secrets.AWS_SECRET_ACCESS_KEY }};Region=${{ secrets.AWS_REGION }};QueueNamePrefix=GHA-${{ github.run_id }}" | |
| echo "ServiceControl_TransportTests_SQS_ConnectionString=$connectString" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
| - name: Run tests | |
| uses: Particular/run-tests-action@v1.7.0 | |
| env: | |
| ServiceControl_TESTS_FILTER: ${{ matrix.test-category }} | |
| PARTICULARSOFTWARE_LICENSE: ${{ secrets.LICENSETEXT }} | |
| AZURE_ACI_CREDENTIALS: ${{ secrets.AZURE_ACI_CREDENTIALS }} | |
| windows-installers: | |
| uses: ./.github/workflows/build-windows.yml | |
| secrets: inherit | |
| containers: | |
| uses: ./.github/workflows/build-containers.yml | |
| secrets: inherit | |
| db-container: | |
| uses: ./.github/workflows/build-db-container.yml | |
| secrets: inherit | |
| # See /src/container-integration-test/README.md | |
| container-test: | |
| needs: [ 'containers', 'db-container' ] | |
| uses: ./.github/workflows/container-integration-test.yml | |
| secrets: inherit |