Skip to content

Add package testing for .NET 8, 9, and 10 on Windows#11

Merged
Malcolmnixon merged 2 commits intomainfrom
copilot/add-package-testing-job
Dec 26, 2025
Merged

Add package testing for .NET 8, 9, and 10 on Windows#11
Malcolmnixon merged 2 commits intomainfrom
copilot/add-package-testing-job

Conversation

Copy link
Contributor

Copilot AI commented Dec 26, 2025

The NuGet package was not being tested after build to verify the packaged Weasyprint tool executes correctly.

Changes

  • build.yaml: Added test job that matrix-tests the built NuGet package on Windows with .NET 8.x, 9.x, and 10.x

    • Downloads build artifacts
    • Installs package globally via dotnet tool install
    • Executes weasyprint --help and validates exit code
  • AGENTS.md: Updated build process documentation to include test job validation

  • CONTRIBUTING.md: Updated CI pipeline documentation to reflect automated package testing

Example

The test job runs after successful build:

test:
  name: Test Package
  needs: build
  runs-on: windows-latest
  strategy:
    matrix:
      dotnet-version: ['8.x', '9.x', '10.x']
  steps:
    - name: Setup dotnet
      uses: actions/setup-dotnet@v5
      with:
        dotnet-version: ${{ matrix.dotnet-version }}
    
    - name: Download Artifacts
      uses: actions/download-artifact@v6
      with:
        name: build-artifacts
        path: artifacts
    
    - name: Install Package
      shell: pwsh
      run: |
        dotnet tool install --global --add-source artifacts DemaConsulting.WeasyprintTool
    
    - name: Test Weasyprint Tool
      shell: pwsh
      run: |
        weasyprint --help
        if ($LASTEXITCODE -ne 0) {
          Write-Error "Weasyprint tool failed with exit code $LASTEXITCODE"
          exit 1
        }
Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature]: Add package testing</issue_title>
<issue_description>### Problem Statement

After building the package, it should be tested to ensure the packaged Weasyprint tool executes correctly.

Proposed Solution

The build.yaml file should be updated to:

Add a test job which matrix-tests on Windows with DotNet 8, 9, and 10 by downloading the NuGet package created in the build job, installing it, and then running the weasyprint tool with a simple command line such as asking for help and then checking the tool ran without error.

The CI testing information should be updated in the AGENTS.md and CONTRIBUTING.md files.

Alternatives Considered

No response

Additional Context

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
@Malcolmnixon Malcolmnixon marked this pull request as ready for review December 26, 2025 17:06
@Malcolmnixon Malcolmnixon merged commit 280deb1 into main Dec 26, 2025
5 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/add-package-testing-job branch December 26, 2025 17:06
Copilot AI restored the copilot/add-package-testing-job branch December 26, 2025 17:06
Copilot AI changed the title [WIP] Add package testing for Weasyprint tool Add package testing for .NET 8, 9, and 10 on Windows Dec 26, 2025
Copilot AI requested a review from Malcolmnixon December 26, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add package testing

2 participants