Main v2 workflow #7854
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: Main v2 workflow | |
on: | |
workflow_dispatch: | |
push: | |
schedule: | |
- cron: '0 2/5 * * *' | |
jobs: | |
run: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-latest, macos-latest] | |
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', 'latest'] | |
debug: [true, false] | |
exclude: | |
- operating-system: macos-latest | |
php-versions: '5.3' | |
- operating-system: macos-latest | |
php-versions: '5.4' | |
- operating-system: macos-latest | |
php-versions: '5.5' | |
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
ini-values: "post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata" | |
env: | |
debug: ${{ matrix.debug }} | |
- name: Add Problem Matcher | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- 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 && '${{ matrix.php-versions }}' != 'latest') {throw new Exception('Wrong PHP version Installed');}" | |
- name: Testing Composer version | |
run: php -r "if(preg_match('/.*Composer.* 2.*/', @exec('composer -V')) == 0) {throw new Exception('Wrong composer version');}" | |
- name: Testing Extensions | |
run: | | |
php -m | |
- name: Testing ini values | |
run: | | |
php -r "if(ini_get('post_max_size')!='256M') {throw new Exception('post_max_size not added');}" | |
php -r "if(ini_get('short_open_tag')!=1) {throw new Exception('short_open_tag not added');}" | |
php -r "if(ini_get('date.timezone')!='Asia/Kolkata') {throw new Exception('date.timezone not added');}" |