Bump TUnit from 1.15.11 to 1.17.36 #124
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: CI Pipeline | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - "src/**" | |
| - ".github/workflows/ci-pipeline.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build-main: | |
| name: Build Solution | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.sanitize_version.outputs.sanitized_version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: "10.0.x" | |
| dotnet-quality: "preview" | |
| - name: Get Next Semantic Version | |
| id: semver | |
| uses: ietf-tools/semver-action@v1.11.0 | |
| with: | |
| token: ${{ github.token }} | |
| branch: ${{ github.head_ref }} | |
| patchList: fix, bugfix, perf, refactor, test, tests, chore, patch | |
| majorList: major, breaking | |
| minorList: minor, feat, feature | |
| noVersionBumpBehavior: patch | |
| fallbackTag: 'v0.0.0' | |
| - name: Sanitize Semantic Version | |
| id: sanitize_version | |
| run: | | |
| SANITISED_BRANCH=$(echo "${{ github.head_ref }}" | sed 's/[^a-zA-Z0-9._-]/-/g') | |
| VERSION="${{ steps.semver.outputs.nextStrict }}-$SANITISED_BRANCH-${{ github.run_number }}" | |
| echo "sanitized_version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Restore Dependencies | |
| working-directory: src | |
| run: dotnet restore Lazarus.slnx | |
| - name: Build Solution | |
| working-directory: src | |
| run: dotnet build Lazarus.slnx -c Release -p:Version=${{ steps.sanitize_version.outputs.sanitized_version }} | |
| - name: Upload Build Artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: build-output | |
| path: ./src | |
| test: | |
| name: Run ${{ matrix.test-name }} | |
| runs-on: ubuntu-latest | |
| needs: build-main | |
| strategy: | |
| matrix: | |
| include: | |
| - test-name: "Lazarus Unit Tests" | |
| test-project: "Lazarus.Tests.Unit" | |
| - test-name: "HealthChecks Unit Tests" | |
| test-project: "Lazarus.Extensions.HealthChecks.Tests.Unit" | |
| - test-name: "HealthChecks Integration Tests" | |
| test-project: "Lazarus.Extensions.HealthChecks.Tests.Integration" | |
| steps: | |
| - name: Download Build Artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: build-output | |
| path: ./build | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: "10.0.x" | |
| dotnet-quality: "preview" | |
| - name: Run ${{ matrix.test-name }} | |
| timeout-minutes: 5 | |
| working-directory: ./build/${{ matrix.test-project }}/bin/Release/net10.0 | |
| run: dotnet ${{ matrix.test-project }}.dll | |
| package: | |
| name: Package ${{ matrix.package-name }} Pre-release | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-main | |
| - test | |
| strategy: | |
| matrix: | |
| include: | |
| - package-name: "Lazarus" | |
| project-path: "Lazarus/Lazarus.csproj" | |
| - package-name: "HealthChecks" | |
| project-path: "Lazarus.Extensions.HealthChecks/Lazarus.Extensions.HealthChecks.csproj" | |
| steps: | |
| - name: Download Build Artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: build-output | |
| path: ./build | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: "10.0.x" | |
| dotnet-quality: "preview" | |
| - name: Restore ${{ matrix.package-name }} Dependencies | |
| working-directory: ./build | |
| run: dotnet restore ${{ matrix.project-path }} | |
| - name: Package ${{ matrix.package-name }} | |
| working-directory: ./build | |
| run: dotnet pack ./${{ matrix.project-path }} --no-build --no-restore -o ./artifacts -p:Version=${{ needs.build-main.outputs.version }} | |
| - name: Publish ${{ matrix.package-name }} to GitHub Packages | |
| if: github.event.pull_request.head.repo.fork == false | |
| working-directory: ./build | |
| run: | | |
| dotnet nuget add source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \ | |
| --name github \ | |
| --username "USERNAME" \ | |
| --password ${{ secrets.GITHUB_TOKEN }} \ | |
| --store-password-in-clear-text | |
| dotnet nuget push "./artifacts/*.nupkg" \ | |
| --source github \ | |
| --api-key ${{ secrets.GITHUB_TOKEN }} |