Skip to content

INI v2 workflow

INI v2 workflow #1163

Workflow file for this run

name: INI v2 workflow
on:
workflow_dispatch:
push:
schedule:
- cron: '0 4 * * *'
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-24.04, windows-latest, macos-13]
php-versions: ['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', '8.4']
ini: ['none', 'development', 'production']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
ini-file: ${{ matrix.ini }}
ini-values: "post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata"
- name: Test action side effects
run: php -r "if(strpos(@exec('git status'), 'nothing to commit') === false) {throw new Exception('Action has side effects');}"
- name: Testing PHP version
run: |
php -v
php -r "if(strpos(phpversion(), '${{ matrix.php-versions }}') === false) {throw new Exception('Wrong PHP version Installed');}"
- name: Testing ini values for none
if: matrix.ini == 'none'
run: php -r "if(ini_get('error_reporting')!='') {throw new Exception('wrong ini file');}"
- name: Testing ini values for production
if: matrix.ini == 'production'
run: php -r "if(ini_get('error_reporting')!='22527') {throw new Exception('wrong ini file');}"
- name: Testing ini values for development
if: matrix.ini == 'development' && matrix.php-versions != '8.4'
run: php -r "if(ini_get('error_reporting')!='32767') {throw new Exception('wrong ini file');}"
- name: Testing ini values for development
if: matrix.ini == 'development' && matrix.php-versions == '8.4'
run: php -r "if(ini_get('error_reporting')!='30719') {throw new Exception('wrong ini file');}"