Add more ways for funnel publishing consumers registration #224
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: Publisher Build & Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags-ignore: [ "*-v*" ] | |
| paths: | |
| - "publisher/**" | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - "publisher/**" | |
| jobs: | |
| ci: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./publisher | |
| env: | |
| DOTNET_VERSION: 10.0 | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Tool Restore | |
| run: dotnet tool restore | |
| - name: Restore | |
| run: dotnet restore | |
| - name: Check formatting | |
| run: dotnet tool run csharpier check . | |
| - name: Build | |
| run: dotnet build --no-restore | |
| - name: Test Publisher | |
| run: > | |
| dotnet test | |
| --project ./test/LeanCode.Pipe.Tests/LeanCode.Pipe.Tests.csproj | |
| --no-build | |
| - name: Test Funnel | |
| run: > | |
| dotnet test | |
| --project ./test/Funnel.Tests/LeanCode.Pipe.Funnel.Tests/LeanCode.Pipe.Funnel.Tests.csproj | |
| --no-build | |
| - name: Test Test Client | |
| run: > | |
| dotnet test | |
| --project ./test/LeanCode.Pipe.TestClient.Tests/LeanCode.Pipe.TestClient.Tests.csproj | |
| --no-build | |
| - name: Integration test | |
| run: > | |
| dotnet test | |
| --project ./test/LeanCode.Pipe.IntegrationTests/LeanCode.Pipe.IntegrationTests.csproj | |
| --no-build | |
| env: | |
| EnableFunnel: 'false' | |
| - name: Integration test with Funnel | |
| run: > | |
| dotnet test | |
| --project ./test/LeanCode.Pipe.IntegrationTests/LeanCode.Pipe.IntegrationTests.csproj | |
| --no-build | |
| env: | |
| EnableFunnel: 'true' | |
| - name: Process test results | |
| if: always() | |
| run: | | |
| # Strip BOM from JSON files | |
| find TestResults -name '*.json' | xargs -n 1 sed -i "$(printf '1s/^\357\273\277//')" | |
| # Merge coverage XML files | |
| dotnet coverage merge TestResults/*.xml -o TestResults/cobertura.xml -f cobertura | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| if: always() | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./publisher/TestResults/cobertura.xml | |
| fail_ci_if_error: false | |
| - name: Publish test report | |
| uses: ctrf-io/github-test-reporter@v1 | |
| if: always() | |
| with: | |
| report-path: './publisher/TestResults/*.json' | |
| summary-report: true | |
| failed-folded-report: true | |
| skipped-report: true | |
| annotate: true | |
| pull-request: true | |
| overwrite-comment: true | |
| comment-tag: '${{ github.workflow }}-${{ github.job }}' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |