V4.1.1/service update #61
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: Savvy I/O Pipeline | |
| on: | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - .codecov/** | |
| - .docfx/** | |
| - .nuget/** | |
| - '**/*.md' | |
| workflow_dispatch: | |
| inputs: | |
| configuration: | |
| type: choice | |
| description: The build configuration to use in the deploy stage. | |
| required: true | |
| default: Release | |
| options: | |
| - Debug | |
| - Release | |
| permissions: | |
| contents: read | |
| jobs: | |
| prepare_test: | |
| name: 📜 Prepare Test | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| json: ${{ steps.test-projects.outputs.result }} | |
| steps: | |
| - name: Checkout | |
| uses: codebeltnet/git-checkout@v1 | |
| - id: test-projects | |
| name: Generate matrix for test projects | |
| uses: codebeltnet/shell-globbing@v2 | |
| with: | |
| pattern: | | |
| test/**/*.csproj | |
| !test/**/Savvyio.FunctionalTests.csproj | |
| !test/**/Savvyio.Extensions.SimpleQueueService.FunctionalTests.csproj | |
| !test/**/Savvyio.Extensions.QueueStorage.FunctionalTests.csproj | |
| !test/**/Savvyio.Extensions.RabbitMQ.FunctionalTests.csproj | |
| - name: JSON output | |
| run: echo "${{ steps.test-projects.outputs.result }}" | |
| build: | |
| name: call-build | |
| strategy: | |
| matrix: | |
| configuration: [Debug, Release] | |
| uses: codebeltnet/jobs-dotnet-build/.github/workflows/default.yml@v2 | |
| with: | |
| configuration: ${{ matrix.configuration }} | |
| strong-name-key-filename: savvyio.snk | |
| secrets: inherit | |
| pack: | |
| name: call-pack | |
| needs: [build] | |
| strategy: | |
| matrix: | |
| configuration: [Debug, Release] | |
| uses: codebeltnet/jobs-dotnet-pack/.github/workflows/default.yml@v2 | |
| with: | |
| configuration: ${{ matrix.configuration }} | |
| version: ${{ needs.build.outputs.version }} | |
| test: | |
| name: call-test | |
| needs: [build, prepare_test] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, windows-2022] | |
| configuration: [Debug, Release] | |
| project: ${{ fromJson(needs.prepare_test.outputs.json) }} | |
| uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v2 | |
| with: | |
| runs-on: ${{ matrix.os }} | |
| configuration: ${{ matrix.configuration }} | |
| projects: ${{ matrix.project }} | |
| build-switches: -p:SkipSignAssembly=true | |
| restore: true | |
| integration_test: | |
| name: ⚗️ Integration Test - Azure and AWS | |
| needs: [build] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, windows-2022] | |
| configuration: [Release] | |
| project: [ test/**/Savvyio.FunctionalTests.csproj, test/**/Savvyio.Extensions.SimpleQueueService.FunctionalTests.csproj, test/**/Savvyio.Extensions.QueueStorage.FunctionalTests.csproj ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: codebeltnet/git-checkout@v1 | |
| - name: Install .NET | |
| uses: codebeltnet/install-dotnet@v2 | |
| - name: Install .NET Tool - Report Generator | |
| uses: codebeltnet/dotnet-tool-install-reportgenerator@v1 | |
| - name: Test with ${{ matrix.configuration }} build | |
| uses: codebeltnet/dotnet-test@v4 | |
| with: | |
| projects: ${{ matrix.project }} | |
| configuration: ${{ matrix.configuration }} | |
| build-switches: -p:SkipSignAssembly=true | |
| restore: true | |
| env: | |
| AWS__CALLERIDENTITY: ${{ secrets.AWS_CALLER_IDENTITY }} | |
| AWS__IAM__ACCESSKEY: ${{ secrets.AWS_IAM_ACCESSKEY }} | |
| AWS__IAM__SECRETKEY: ${{ secrets.AWS_IAM_SECRETKEY }} | |
| AWS__LOCALSTACK: ${{ secrets.AWS_LOCALSTACK }} | |
| AZURE__STORAGE__QUEUECONNECTIONSTRING: ${{ secrets.AZURE_STORAGE_QUEUECONNECTIONSTRING }} | |
| AZURE__NEWTONSOFT__EVENTGRID__WINDOWS__DEBUG__KEY: ${{ secrets.AZURE_NEWTONSOFT_EVENTGRID_WINDOWS_DEBUG_KEY }} | |
| AZURE__NEWTONSOFT__EVENTGRID__WINDOWS__RELEASE__KEY: ${{ secrets.AZURE_NEWTONSOFT_EVENTGRID_WINDOWS_RELEASE_KEY }} | |
| AZURE__NEWTONSOFT__EVENTGRID__LINUX__DEBUG__KEY: ${{ secrets.AZURE_NEWTONSOFT_EVENTGRID_LINUX_DEBUG_KEY }} | |
| AZURE__NEWTONSOFT__EVENTGRID__LINUX__RELEASE__KEY: ${{ secrets.AZURE_NEWTONSOFT_EVENTGRID_LINUX_RELEASE_KEY }} | |
| AZURE__EVENTGRID__WINDOWS__DEBUG__KEY: ${{ secrets.AZURE_EVENTGRID_WINDOWS_DEBUG_KEY }} | |
| AZURE__EVENTGRID__WINDOWS__RELEASE__KEY: ${{ secrets.AZURE_EVENTGRID_WINDOWS_RELEASE_KEY }} | |
| AZURE__EVENTGRID__LINUX__DEBUG__KEY: ${{ secrets.AZURE_EVENTGRID_LINUX_DEBUG_KEY }} | |
| AZURE__EVENTGRID__LINUX__RELEASE__KEY: ${{ secrets.AZURE_EVENTGRID_LINUX_RELEASE_KEY }} | |
| integration_test_rabbitmq: | |
| name: ⚗️ Integration Test - RabbitMQ | |
| needs: [build] | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: codebeltnet/git-checkout@v1 | |
| - name: Install .NET | |
| uses: codebeltnet/install-dotnet@v2 | |
| - name: Install .NET Tool - Report Generator | |
| uses: codebeltnet/dotnet-tool-install-reportgenerator@v1 | |
| - name: Spin up RabbitMQ test dependency | |
| run: | | |
| docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:management | |
| - name: Test with Release build | |
| uses: codebeltnet/dotnet-test@v4 | |
| with: | |
| projects: test/**/Savvyio.Extensions.RabbitMQ.FunctionalTests.csproj | |
| build-switches: -p:SkipSignAssembly=true | |
| restore: true | |
| - name: Stop RabbitMQ | |
| run: | | |
| docker stop rabbitmq | |
| docker rm rabbitmq | |
| sonarcloud: | |
| name: call-sonarcloud | |
| needs: [build, test, integration_test] | |
| uses: codebeltnet/jobs-sonarcloud/.github/workflows/default.yml@v1 | |
| with: | |
| organization: geekle | |
| projectKey: savvyio | |
| version: ${{ needs.build.outputs.version }} | |
| secrets: inherit | |
| codecov: | |
| name: call-codecov | |
| needs: [build, test, integration_test] | |
| uses: codebeltnet/jobs-codecov/.github/workflows/default.yml@v1 | |
| with: | |
| repository: codebeltnet/savvyio | |
| secrets: inherit | |
| codeql: | |
| name: call-codeql | |
| needs: [build, test, integration_test] | |
| uses: codebeltnet/jobs-codeql/.github/workflows/default.yml@v1 | |
| permissions: | |
| security-events: write | |
| deploy: | |
| if: github.event_name != 'pull_request' | |
| name: call-nuget | |
| needs: [build, pack, test, integration_test, sonarcloud, codecov, codeql] | |
| uses: codebeltnet/jobs-nuget-push/.github/workflows/default.yml@v1 | |
| with: | |
| version: ${{ needs.build.outputs.version }} | |
| environment: Production | |
| configuration: ${{ inputs.configuration == '' && 'Release' || inputs.configuration }} | |
| permissions: | |
| contents: write | |
| packages: write | |
| secrets: inherit |