Skip to content

Read each HTML presentational attribute only on the elements HTML defines it for, under any stylesheet rule #1419

Read each HTML presentational attribute only on the elements HTML defines it for, under any stylesheet rule

Read each HTML presentational attribute only on the elements HTML defines it for, under any stylesheet rule #1419

Workflow file for this run

# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: "Snapshot Tests"
on:
pull_request:
push:
branches:
- "master"
- "development"
- "test"
- "gravitypdf"
schedule:
- cron: "0 17 * * *"
workflow_dispatch:
# A push to a pull request cancels the run it replaces. Other events run in a group of their own
concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}"
cancel-in-progress: true
jobs:
tests:
name: "Tests"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: "actions/checkout@v7"
- name: Update sources and install ghostscript
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: ghostscript
version: 1.0
refresh: true
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.5"
extensions: "mbstring, gd, bcmath, bz2, imagick, fileinfo"
tools: composer:v2
ini-values: error_reporting=-1
- name: "Let Imagick read PDFs"
run: |
# Older policies forbid the PDF coder. Snapshots only rasterise when they differ, so read one now to fail early
sudo sed -i 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-*/policy.xml
# shellcheck disable=SC2016
php -r '$i = new Imagick(); $i->setResolution(120, 120); $i->readImage("tests/data/snapshots/fixed-position-html.pdf"); printf("%s read %d page of %dx%d px\n", Imagick::getVersion()["versionString"], $i->getNumberImages(), $i->getImageWidth(), $i->getImageHeight());'
- name: "Locate Composer cache"
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
- name: "Cache Composer downloads"
uses: "actions/cache@v6"
with:
path: "${{ steps.composer-cache.outputs.dir }}"
key: "composer-${{ runner.os }}-php8.5-${{ hashFiles('composer.json') }}"
restore-keys: "composer-${{ runner.os }}-php8.5-"
- name: "Install dependencies"
run: "composer install --no-interaction --no-progress"
- name: "Snapshot Tests"
run: composer test -- --group=snapshot
- uses: actions/upload-artifact@v7
if: ${{ failure() }}
with:
name: "phpunit-artifact"
path: tmp/artifacts/
if-no-files-found: ignore