From 63dbfe2897095f27a56fc1f77856c61e65ce86d6 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Tue, 25 Feb 2025 12:31:52 +0100 Subject: [PATCH] Support Laravel 12 (#6) * Laravel 12 * Update run-tests.yml * Update run-tests.yml * Run apt-get update * Update run-tests.yml * Update run-tests.yml * Update run-tests.yml * Update run-tests.yml * Update run-tests.yml * Update run-tests.yml * Create requirements.txt * Update run-tests.yml * Update run-tests.yml * Update run-tests.yml * Update run-tests.yml * Update run-tests.yml --- .github/workflows/run-tests.yml | 27 +++++++++++++++++++-------- composer.json | 10 +++++----- requirements.txt | 1 + 3 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 requirements.txt diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index dd6ed5a..acadae6 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -7,8 +7,6 @@ on: pull_request: branches: - "*" - schedule: - - cron: '0 0 * * *' jobs: php-tests: @@ -19,12 +17,14 @@ jobs: strategy: matrix: - php: [8.3, 8.2, 8.1] - laravel: [11.*, 10.*, 9.*] - dependency-version: [prefer-lowest, prefer-stable] + php: [8.4, 8.3, 8.2, 8.1] + laravel: [12.*, 11.*, 10.*, 9.*] + dependency-version: [prefer-stable] exclude: - laravel: 11.* php: 8.1 + - laravel: 12.* + php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} @@ -32,10 +32,19 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - uses: actions/setup-python@v5 + with: + python-version: '3.13' + cache: 'pip' # caching pip dependencies + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + python -m pip install Pillow numpy filetype setuptools wheel twine + - name: Install weasyprint run: | - sudo apt install python3-pip python3-cffi python3-brotli libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 - sudo pip install weasyprint + pip install -r requirements.txt weasyprint --info whereis weasyprint @@ -52,4 +61,6 @@ jobs: composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress - name: Execute Unit Tests - run: composer test + run: | + export WEASYPRINT_BINARY=weasyprint + composer test diff --git a/composer.json b/composer.json index 348f452..7648484 100644 --- a/composer.json +++ b/composer.json @@ -14,13 +14,13 @@ } ], "require": { - "php": ">=8.1", - "illuminate/support": "^9|^10|^11", - "illuminate/filesystem": "^9|^10|^11", - "pontedilana/php-weasyprint": "^1.3" + "php": "^8.1", + "illuminate/support": "^9|^10|^11|^12", + "illuminate/filesystem": "^9|^10|^11|^12", + "pontedilana/php-weasyprint": "^1.5" }, "require-dev": { - "orchestra/testbench": "^7|^8|^9", + "orchestra/testbench": "^7|^8|^9|^10", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..bb100f7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +weasyprint >= 64