Skip to content

GH Actions: Bump shivammathur/setup-php in the action-runners group #377

GH Actions: Bump shivammathur/setup-php in the action-runners group

GH Actions: Bump shivammathur/setup-php in the action-runners group #377

Workflow file for this run

---
name: Quicktest
on:
# Run on pushes to feature branches.
push:
branches-ignore:
- main
# Allow manually triggering the workflow.
workflow_dispatch:
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
#### QUICK TEST STAGE ####
# This is a much quicker test which only runs the integration tests against a limited set of
# supported PHP/PHPCS combinations.
quicktest:
runs-on: "${{ matrix.os }}"
strategy:
matrix:
php:
- '5.4'
- '7.2'
- 'latest'
composer:
# Note: for PHP 5.4 - 7.1, "v2" will install Composer 2.2.
# For PHP 7.2+, it will install Composer "latest".
- 'v2'
os:
- 'ubuntu-latest'
- 'windows-latest'
# Installing on Windows with PHP 5.4 runs into all sorts of problems (which are not ours).
# Exclude the Windows PHP 5.4 builds and replace them with PHP 5.5 for the same.
# @link https://github.com/PHPCSStandards/composer-installer/issues/181
# @link https://github.com/PHPCSStandards/composer-installer/pull/213
exclude:
- php: '5.4'
os: 'windows-latest'
include:
- php: '5.5'
os: 'windows-latest'
name: "Quick test"
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
with:
php-version: ${{ matrix.php }}
extensions: json, zip
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On, display_startup_errors=On
tools: "composer:${{ matrix.composer }}"
coverage: none
env:
fail-fast: true
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
- name: Install Composer dependencies
uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # 3.1.1
with:
composer-options: '--optimize-autoloader'
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")
- name: Run integration tests
run: vendor/bin/phpunit --no-coverage