Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,40 @@ jobs:
path: |
pack/*.nupkg
pack/_manifest/spdx_2.2/*.*

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: |
$nupkg = Get-ChildItem -Path artifacts -Filter "*.nupkg" | Select-Object -First 1
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
}
Write-Host "Weasyprint tool executed successfully"

2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Before completing any task, always run these quality checks:
3. **Build Verification**: Check that workflows pass
- Quality Checks job should pass
- Build job should pass
- Test job should pass (validates package on Windows with .NET 8, 9, and 10)

### Testing Changes

Expand All @@ -88,6 +89,7 @@ The project uses GitHub Actions workflows:
- Downloads Weasyprint binaries
- Generates SBOM (Software Bill of Materials)
- Creates NuGet package
- Tests the package on Windows with .NET 8, 9, and 10
3. **release.yaml** - Handles releases
- Creates releases with proper versioning

Expand Down
7 changes: 6 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ Before submitting a pull request:
3. **Build**: Ensure the project builds successfully
4. **Testing**: Test your changes thoroughly

The CI pipeline will automatically run these checks on your pull request.
The CI pipeline will automatically run these checks on your pull request, including:

- Quality checks (spelling and markdown linting)
- Build verification
- Package testing on Windows with .NET 8, 9, and 10

### Commit Messages

Expand All @@ -102,6 +106,7 @@ WeasyprintTool uses GitHub Actions for building. The build process:
1. Downloads the DotnetToolWrapper
2. Downloads Weasyprint binaries
3. Creates the NuGet package
4. Tests the package on Windows with .NET 8, 9, and 10

To test the build locally, you can examine the workflow files in `.github/workflows/`.

Expand Down
Loading