Skip to content

Commit

Permalink
Bump actions/checkout and add PHP 8.3 (#642)
Browse files Browse the repository at this point in the history
* Bump actions/checkout and add PHP 8.3

* Update the composer json tests

* Remove PHP 5.3 and 5.4 from the matrix

* add permission entry

Restrict GitHub actions access

---------

Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
  • Loading branch information
williamdes and nicolaasuni committed Sep 6, 2023
1 parent 96985b9 commit 73d8186
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-docs.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
lint-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: lint php documentation
uses: sudo-bot/action-doctum@dev
with:
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/tests.yml
@@ -1,5 +1,8 @@
name: Run tests

permissions:
contents: read

on:
push:
branches:
Expand All @@ -16,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ["5.3", "5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]
php-version: ["5.3", "5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
os: [macos-latest, windows-latest]
experimental: [false]
php-extensions: ["bcmath, imagick, gd"]
Expand All @@ -26,14 +29,12 @@ jobs:
# with imagick PHP extension for PHP 5.3 - 5.6
- { php-version: '5.3', os: windows-latest }
- { php-version: '5.4', os: windows-latest }
- { php-version: '5.5', os: windows-latest }
- { php-version: '5.6', os: windows-latest }
# Somehow some tests fail under Windows and PHP 7.0,
# so we disable that run for now
- { php-version: '7.0', os: windows-latest }

# Add more specific tests
include:
- { php-version: '5.3', os: windows-latest, experimental: false, php-extensions: 'bcmath, gd', coverage-extension: 'none' }
- { php-version: '5.4', os: windows-latest, experimental: false, php-extensions: 'bcmath, gd', coverage-extension: 'none' }
- { php-version: '5.5', os: windows-latest, experimental: false, php-extensions: 'bcmath, gd', coverage-extension: 'none' }
- { php-version: '5.6', os: windows-latest, experimental: false, php-extensions: 'bcmath, gd', coverage-extension: 'none' }
# Specify coverage extension for Ubuntu runs
Expand All @@ -50,11 +51,12 @@ jobs:
- { php-version: '8.0', os: ubuntu-latest, experimental: false, php-extensions: 'bcmath, imagick, gd', coverage-extension: 'pcov' }
- { php-version: '8.1', os: ubuntu-latest, experimental: false, php-extensions: 'bcmath, imagick, gd', coverage-extension: 'pcov' }
- { php-version: '8.2', os: ubuntu-latest, experimental: false, php-extensions: 'bcmath, imagick, gd', coverage-extension: 'pcov' }
- { php-version: '8.3', os: ubuntu-latest, experimental: false, php-extensions: 'bcmath, imagick, gd', coverage-extension: 'pcov' }
- { php-version: 'nightly', os: ubuntu-latest, experimental: true, php-extensions: 'bcmath, imagick, gd', coverage-extension: 'pcov' }
env:
PDFINFO_BINARY: ${{ (matrix.os == 'ubuntu-latest') && '/usr/bin/pdfinfo' || ((matrix.os == 'macos-latest') && '/usr/local/bin/pdfinfo' || 'C:\ProgramData\Chocolatey\bin\pdfinfo.exe') }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install pdfinfo, pdftopng or pdftoppm
uses: ConorMacBride/install-package@v1
with:
Expand Down Expand Up @@ -86,9 +88,9 @@ jobs:
path: ~/.composer/cache/
key: composer-cache
- name: Install dependencies
run: composer install --no-interaction
run: composer update --no-interaction
- name: Install test dependencies
run: cd ./tests && composer install --no-interaction && cd ../
run: cd ./tests && composer update --no-interaction && cd ../
- name: Run shell-based test suite
if: runner.os == 'Linux'
run: ./tests/launch.sh
Expand Down Expand Up @@ -118,12 +120,11 @@ jobs:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use php 8.0
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
tools: composer:v2
- name: Cache module
uses: actions/cache@v3
with:
Expand Down
14 changes: 2 additions & 12 deletions tests/composer.json
Expand Up @@ -2,13 +2,8 @@
"name": "tecnickcom/tcpdf-tests",
"type": "metapackage",
"description": "Dependencies for the test suite",
"keywords": [
"PDF",
"tcpdf",
"test"
],
"homepage": "http://www.tcpdf.org/",
"license": "LGPL-3.0-only",
"license": "LGPL-3.0-or-later",
"authors": [
{
"name": "Philippe Jausions",
Expand All @@ -18,7 +13,7 @@
],
"require": {
"PHP": ">=5.3.0",
"cs278/mktemp": "*"
"cs278/mktemp": "^1.2.0"
},
"suggest": {
"rosell-dk/locate-binaries": "Allows to detect executables such as pdfinfo"
Expand All @@ -27,10 +22,5 @@
"psr-4": {
"Tecnickcom\\TCPDF\\Tests\\": "src/"
}
},
"archive": {
"exclude": [
"/examples"
]
}
}

0 comments on commit 73d8186

Please sign in to comment.