Initial commit

This commit is contained in:
2026-08-20 11:41:17 +00:00
commit 6949695eac
2334 changed files with 646393 additions and 0 deletions
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. ...
**Expected behavior**
A clear and concise description of what you expected to happen.
**Logs**
If applicable, copy the relevant logs to help explain your problem.
**Environment:**
- OS:
- PHP version:
- Version:
**Additional context**
Add any other context about the problem here.
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
@@ -0,0 +1,26 @@
# Description
Please include a summary of the change and include relevant motivation and context.
...
## Checklist:
- [ ] The `make buildall` command has been run successfully without any error or warning.
- [ ] Any new code line is covered by unit tests and the coverage has not dropped.
- [ ] Any new code follows the style guidelines of this project.
- [ ] The code changes have been self-reviewed.
- [ ] Corresponding changes to the documentation have been made.
> The maintainer bumps the `VERSION` file at release time. Do not change it in your PR.
## Type of change:
- [ ] Minor non-breaking change (e.g., bug fix, dependencies updates).
- [ ] New feature (non-breaking change which adds functionality).
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected).
- [ ] Automation.
- [ ] Documentation.
- [ ] Example.
- [ ] Testing.
@@ -0,0 +1,94 @@
name: check
permissions:
contents: read
concurrency:
group: check-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- 'main'
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
workflow_dispatch:
jobs:
test-php:
name: Test on php ${{ matrix.php-version }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
php-version: ["8.2", "8.3", "8.4", "8.5"]
steps:
- uses: actions/checkout@v7
#- name: Install pdfinfo
# run: sudo apt-get install -y poppler-utils
- name: Use php ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
extensions: bcmath, curl, date, gd, hash, imagick, json, mbstring, openssl, pcre, zlib
ini-values: display_errors=on, error_reporting=-1, zend.assertions=1
- name: List php modules
run: php -m
- name: List php modules using "no php ini" mode
run: php -m -n
- name: Cache module
uses: actions/cache@v6
with:
path: ~/.composer/cache/
key: ${{ runner.os }}-php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-composer-
- name: Install dependencies
env:
GH_TOKEN: ${{ github.token }}
run: make deps
- name: Install qpdf
if: matrix.php-version == '8.4'
run: sudo apt-get update && sudo apt-get install -y qpdf
- name: Run preflight
if: matrix.php-version == '8.4'
run: make preflight
- name: Run all tests
run: make qa
#- name: Generate CSS renderability reports
# if: matrix.php-version == '8.4'
# run: |
# php resources/css/renderability_score.php \
# --corpus=test/fixtures/html/real_pages/corpus.json \
# --json=target/report/renderability-score.json \
# --markdown=target/report/renderability-score.md
# php resources/css/renderability_trend.php \
# --score=target/report/renderability-score.json \
# --history=target/report/renderability-trend.json \
# --markdown=target/report/renderability-trend.md \
# --sha=${{ github.sha }} \
# --ref=${{ github.ref_name }} \
# --run-id=${{ github.run_id }}
# cat target/report/renderability-score.md >> "$GITHUB_STEP_SUMMARY"
# cat target/report/renderability-trend.md >> "$GITHUB_STEP_SUMMARY"
- name: Upload CSS renderability reports
if: matrix.php-version == '8.4'
uses: actions/upload-artifact@v4
with:
name: css-renderability-reports-${{ github.run_id }}
path: |
target/report/renderability-score.json
target/report/renderability-score.md
target/report/renderability-trend.json
target/report/renderability-trend.md
- name: Send coverage
if: matrix.php-version == '8.4'
uses: codecov/codecov-action@v7
with:
flags: php-${{ matrix.php-version }}-ubuntu-latest
name: php-${{ matrix.php-version }}-ubuntu-latest