Skip to content

Resolve inherit, initial, unset and revert in the standard CSS mode #1514

Resolve inherit, initial, unset and revert in the standard CSS mode

Resolve inherit, initial, unset and revert in the standard CSS mode #1514

Workflow file for this run

# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: "Tests"
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
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, and a label other than full-ci, run in a group of their own
concurrency:
group: "${{ github.workflow }}-${{ (github.event.action != 'labeled' || github.event.label.name == 'full-ci') && github.event.pull_request.number || github.run_id }}"
cancel-in-progress: true
jobs:
tests:
name: "Tests"
if: github.event.action != 'labeled' || github.event.label.name == 'full-ci'
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
# A pull request without the full-ci label runs 5.6 and 8.5 on both systems, and 7.4 and 8.0 on Ubuntu
matrix: >-
${{ fromJSON(
(github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'full-ci'))
&& '{
"php-version": ["5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4", "8.5"],
"operating-system": ["ubuntu-latest", "windows-latest"]
}'
|| '{
"php-version": ["5.6", "7.4", "8.0", "8.5"],
"operating-system": ["ubuntu-latest", "windows-latest"],
"exclude": [
{"php-version": "7.4", "operating-system": "windows-latest"},
{"php-version": "8.0", "operating-system": "windows-latest"}
]
}'
) }}
steps:
- name: "Checkout"
uses: "actions/checkout@v7"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: "mbstring, gd, bcmath, bz2, fileinfo"
tools: composer:v2
# setup-php turns the JIT on for PHP 8, and on 8.0, 8.4 and 8.5 it corrupts OpenType positioning in the snapshots
ini-values: error_reporting=-1, opcache.enable_cli=1, opcache.jit=disable
- 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 }}-php${{ matrix.php-version }}-font-bundle-lite-${{ hashFiles('composer.json') }}"
restore-keys: "composer-${{ runner.os }}-php${{ matrix.php-version }}-font-bundle-lite-"
- name: "Install dependencies"
run: "composer install --no-interaction --no-progress"
- name: "Install fonts"
run: "composer require mpdf/font-bundle-lite --no-interaction --no-progress"
- name: "Tests"
run: composer test
- uses: actions/upload-artifact@v7
if: ${{ failure() }}
with:
name: "phpunit-artifact-${{ matrix.php-version }}-${{ matrix.operating-system }}"
path: tmp/artifacts/
if-no-files-found: ignore