Repository navigation
Add automated tests for Central Logging ingestion and search #349
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: Build and Test Pull Requests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| name: "Build and Test Pull Requests" | |
| env: | |
| ASPNETCORE_ENVIRONMENT: "Production" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: Install NET 9 | |
| uses: actions/setup-dotnet@v4.0.1 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Restore Nuget Packages | |
| run: | | |
| dotnet restore TransactionProcessing.MerchantPos/TransactionProcessing.MerchantPos.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} | |
| dotnet restore TransactionProcessing.MerchantFileProcessor/TransactionProcessing.MerchantFileProcessor.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} | |
| - name: Build Code | |
| run: | | |
| dotnet build TransactionProcessing.MerchantPos/TransactionProcessing.MerchantPos.sln --configuration Release | |
| dotnet build TransactionProcessing.MerchantFileProcessor/TransactionProcessing.MerchantFileProcessor.sln --configuration Release | |
| pester-tests: | |
| name: "Run PowerShell Tests" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Ensure Pester is Available | |
| shell: pwsh | |
| run: | | |
| if (-not (Get-Module -ListAvailable -Name Pester)) { | |
| Install-Module -Name Pester -Force -SkipPublisherCheck -Scope CurrentUser | |
| } | |
| - name: Run Pester Tests | |
| shell: pwsh | |
| run: | | |
| Invoke-Pester -Path @( | |
| './ScheduledTasks/ReplayParkedQueue/Tests' | |
| './ScheduledTasks/SettlementProcessing/Tests' | |
| './ScheduledTasks/DailySupportCheck/Tests' | |
| ) -CI | |
| health-monitoring-tests: | |
| name: "Run Health Monitoring Unit Tests" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install NET 10 | |
| uses: actions/setup-dotnet@v4.0.1 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Restore Health Monitoring solution | |
| run: dotnet restore HealthMonitoring/HealthMonitoring/HealthMonitoring.sln | |
| - name: Run Health Monitoring unit tests | |
| run: dotnet test HealthMonitoring/HealthMonitoring.Tests/HealthMonitoring.Tests.csproj --configuration Release --no-restore --filter "FullyQualifiedName!~ConfigurationTests" | |
| central-logging-tests: | |
| name: "Run Central Logging Tests" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install NET 10 | |
| uses: actions/setup-dotnet@v4.0.1 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Restore Central Logging solution | |
| run: dotnet restore CentralLogging.sln --source https://api.nuget.org/v3/index.json | |
| - name: Build Central Logging solution | |
| run: dotnet build CentralLogging.sln --configuration Release --no-restore | |
| - name: Test Central Logging solution | |
| run: dotnet test CentralLogging.sln --configuration Release --no-build --no-restore |