-
-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (43 loc) · 1.93 KB
/
ini.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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');}"