Feature/redis async factory #595
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: HealthChecks OpenIdConnectServer CI | |
| permissions: | |
| contents: read | |
| packages: write | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ master ] | |
| paths: | |
| - src/HealthChecks.OpenIdConnectServer/** | |
| - test/HealthChecks.OpenIdConnectServer.Tests/** | |
| - test/_SHARED/** | |
| - .github/workflows/healthchecks_openidconnectserver_ci.yml | |
| - Directory.Build.props | |
| - Directory.Build.targets | |
| - Directory.Packages.props | |
| tags: | |
| - v* | |
| pull_request: | |
| branches: [ master ] | |
| paths: | |
| - src/HealthChecks.OpenIdConnectServer/** | |
| - test/HealthChecks.OpenIdConnectServer.Tests/** | |
| - test/_SHARED/** | |
| - .github/workflows/healthchecks_openidconnectserver_ci.yml | |
| - Directory.Build.props | |
| - Directory.Build.targets | |
| - Directory.Packages.props | |
| jobs: | |
| release-scope: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should_run: ${{ steps.scope.outputs.should_run }} | |
| is_tag: ${{ steps.scope.outputs.is_tag }} | |
| package_version: ${{ steps.scope.outputs.package_version }} | |
| previous_tag: ${{ steps.scope.outputs.previous_tag }} | |
| release_mode: ${{ steps.scope.outputs.release_mode }} | |
| release_reason: ${{ steps.scope.outputs.release_reason }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Determine release scope | |
| id: scope | |
| shell: pwsh | |
| run: | | |
| ./.github/scripts/get-release-scope.ps1 -ProjectPath './src/HealthChecks.OpenIdConnectServer/HealthChecks.OpenIdConnectServer.csproj' | |
| - name: Summarize tag release scope | |
| if: ${{ steps.scope.outputs.is_tag == 'true' }} | |
| shell: bash | |
| run: | | |
| previous_tag='${{ steps.scope.outputs.previous_tag }}' | |
| if [ -z "$previous_tag" ]; then | |
| previous_tag='<none>' | |
| fi | |
| { | |
| echo "## Project CI Tag Scope" | |
| echo | |
| echo "- Project: ./src/HealthChecks.OpenIdConnectServer/HealthChecks.OpenIdConnectServer.csproj" | |
| echo "- Previous tag: $previous_tag" | |
| echo "- Package version: ${{ steps.scope.outputs.package_version }}" | |
| echo "- Release mode: ${{ steps.scope.outputs.release_mode }}" | |
| echo "- Should run: ${{ steps.scope.outputs.should_run }}" | |
| echo "- Reason: ${{ steps.scope.outputs.release_reason }}" | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| build: | |
| needs: release-scope | |
| if: ${{ needs.release-scope.outputs.is_tag != 'true' || needs.release-scope.outputs.should_run == 'true' }} | |
| runs-on: ubuntu-latest | |
| services: | |
| idsvr: | |
| image: nakah/identityserver4 | |
| ports: | |
| - 8888:80 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 10.0.x | |
| - name: Restore | |
| run: | | |
| dotnet restore ./src/HealthChecks.OpenIdConnectServer/HealthChecks.OpenIdConnectServer.csproj && | |
| dotnet restore ./test/HealthChecks.OpenIdConnectServer.Tests/HealthChecks.OpenIdConnectServer.Tests.csproj | |
| - name: Check formatting | |
| run: | | |
| dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.OpenIdConnectServer/HealthChecks.OpenIdConnectServer.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) && | |
| dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.OpenIdConnectServer.Tests/HealthChecks.OpenIdConnectServer.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) | |
| - name: Build | |
| run: | | |
| dotnet build --no-restore ./src/HealthChecks.OpenIdConnectServer/HealthChecks.OpenIdConnectServer.csproj && | |
| dotnet build --no-restore ./test/HealthChecks.OpenIdConnectServer.Tests/HealthChecks.OpenIdConnectServer.Tests.csproj | |
| - name: Test | |
| run: > | |
| dotnet test | |
| ./test/HealthChecks.OpenIdConnectServer.Tests/HealthChecks.OpenIdConnectServer.Tests.csproj | |
| --no-restore | |
| --no-build | |
| --collect "XPlat Code Coverage" | |
| --results-directory .coverage | |
| -- | |
| DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover | |
| - name: Upload Coverage | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| flags: OpenIdConnectServer | |
| directory: .coverage | |
| publish: | |
| needs: | |
| - release-scope | |
| - build | |
| if: ${{ needs.release-scope.outputs.is_tag == 'true' && needs.release-scope.outputs.should_run == 'true' }} | |
| uses: ./.github/workflows/reusable_cd_workflow.yml | |
| secrets: inherit | |
| with: | |
| BUILD_CONFIG: Release | |
| PROJECT_PATH: ./src/HealthChecks.OpenIdConnectServer/HealthChecks.OpenIdConnectServer.csproj | |
| PACKAGE_VERSION: ${{ needs.release-scope.outputs.package_version }} |