GH Actions: run the tests against PHP 8.3 #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Integrate" | |
on: | |
pull_request: null | |
push: | |
branches: | |
- "master" | |
jobs: | |
quality-assurance: | |
name: "Quality Assurance" | |
runs-on: "${{ matrix.operating-system }}" | |
strategy: | |
matrix: | |
operating-system: | |
- "ubuntu-latest" | |
php-version: | |
- "8.1" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Set up PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "${{ matrix.php-version }}" | |
- name: "Set up Java" | |
uses: "actions/setup-java@v3" | |
with: | |
distribution: "zulu" | |
java-version: "11" | |
- name: "Install dependencies with composer" | |
run: "composer install --no-interaction --optimize-autoloader --prefer-dist" | |
- name: "Install phive" | |
run: "ant getphive" | |
- name: "Install dependencies with phive" | |
run: "ant -Dphive.bin=./phive.phar install-tools" | |
- name: "Run friendsofphp/php-cs-fixer" | |
run: "ant -Dphive.bin=./phive.phar php-cs-fixer" | |
- name: "Run phpstan/phpstan" | |
run: "ant -Dphive.bin=./phive.phar phpstan" | |
- name: "Run vimeo/psalm" | |
run: "ant -Dphive.bin=./phive.phar psalm" | |
tests: | |
name: "Tests" | |
runs-on: "${{ matrix.operating-system }}" | |
strategy: | |
matrix: | |
operating-system: | |
- "macos-latest" | |
- "ubuntu-latest" | |
- "windows-latest" | |
php-version: | |
- "7.3" | |
- "7.4" | |
- "8.0" | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
env: | |
PHP_EXTENSIONS: "dom, curl, gnupg, mbstring" | |
PHP_EXTENSIONS_CACHE_KEY: "php-extensions-cache-v1" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Set up extension cache" | |
id: "cache-env" | |
uses: "shivammathur/cache-extensions@v1" | |
with: | |
extensions: "${{ env.PHP_EXTENSIONS }}" | |
key: "${{ env.PHP_EXTENSIONS_CACHE_KEY }}" | |
php-version: "${{ matrix.php-version }}" | |
- name: "Cache extensions installed with shivammathur/setup-php" | |
uses: "actions/cache@v3" | |
with: | |
path: "${{ steps.cache-env.outputs.dir }}" | |
key: "${{ steps.cache-env.outputs.key }}" | |
restore-keys: "${{ steps.cache-env.outputs.key }}" | |
- name: "Set up PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
extensions: "${{ env.PHP_EXTENSIONS }}" | |
ini-values: "display_errors=On, error_reporting=-1, memory_limit=2G" | |
php-version: "${{ matrix.php-version }}" | |
- name: "Install dependencies with composer" | |
run: "composer install --no-interaction --prefer-source" | |
- name: "Install phpunit/phpunit with phive" | |
env: | |
GITHUB_AUTH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
run: "php ./phive --no-progress install --trust-gpg-keys D8406D0D82947747293778314AA394086372C20A phpunit@^9.5" | |
- name: "Run tests with phpunit/phpunit" | |
run: "./tools/phpunit" | |
smoke-tests: | |
name: "Smoke Tests" | |
runs-on: "${{ matrix.operating-system }}" | |
strategy: | |
matrix: | |
operating-system: | |
- "macos-latest" | |
- "ubuntu-latest" | |
- "windows-latest" | |
php-version: | |
- "7.3" | |
- "7.4" | |
- "8.0" | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
env: | |
PHP_EXTENSIONS: "dom, curl, gnupg, mbstring" | |
PHP_EXTENSIONS_CACHE_KEY: "php-extensions-cache-v1" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Set up extension cache" | |
id: "cache-env" | |
uses: "shivammathur/cache-extensions@v1" | |
with: | |
extensions: "${{ env.PHP_EXTENSIONS }}" | |
key: "${{ env.PHP_EXTENSIONS_CACHE_KEY }}" | |
php-version: "${{ matrix.php-version }}" | |
- name: "Cache extensions installed with shivammathur/setup-php" | |
uses: "actions/cache@v3" | |
with: | |
path: "${{ steps.cache-env.outputs.dir }}" | |
key: "${{ steps.cache-env.outputs.key }}" | |
restore-keys: "${{ steps.cache-env.outputs.key }}" | |
- name: "Set up PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
extensions: "${{ env.PHP_EXTENSIONS }}" | |
ini-values: "display_errors=On, error_reporting=-1, memory_limit=2G" | |
php-version: "${{ matrix.php-version }}" | |
- name: "Validate composer.json" | |
run: "composer validate --strict" | |
- name: "Install dependencies with composer" | |
run: "composer install --no-interaction --prefer-source" | |
- name: "Install theseer/autoload with phive" | |
env: | |
GITHUB_AUTH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
run: "php ./phive --no-progress install --trust-gpg-keys BEEB9AED51C28445FAB142228DDB46C4EA2EBCDC phpab" |