Skip to content

Commit

Permalink
runner action change
Browse files Browse the repository at this point in the history
  • Loading branch information
vrkansagara committed Dec 11, 2024
1 parent 02fd407 commit c0929a5
Showing 1 changed file with 50 additions and 42 deletions.
92 changes: 50 additions & 42 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,57 @@ on:

jobs:
build:

runs-on: ubuntu-latest

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
php: ["8.1", "8.2", "8.3", "8.4"]
env:
tools: composer, phpstan, infection
extensions: bcmath, bz2, curl, gd, intl, ldap, mbstring, opcache, readline, sqlite3, tidy, xml, xsl, zip zlib pcre
ini-values: memory_limit=-1
ini-values: memory_limit=-1,default_charset='UTF-8'

name: PHP ${{ matrix.php }} test on ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: zlib,pcre,opcache,imagick, swoole

- name: Know Me !
run: lsb_release -a && uname -a && echo $(pwd) && php -v && php -m

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install dependencies
run: composer install --prefer-dist --no-progress --ignore-platform-req=php

- name: Copy phpunit and phpcs files
run: cp phpcs.xml.dist phpcs.xml && cp phpunit.xml.dist phpunit.xml

- name: Run ch-check
run: composer run-script cs-check

- name: Run cs-fix
run: composer run-script cs-fix

- name: PHPUnit Test
run: composer run-script test
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: zlib,pcre,opcache,imagick, swoole
ini-values: ${{ env.ini-values }}
coverage: pcov
tools: ${{ env.tools }}
env:
fail-fast: true
- name: Know Me !
run: lsb_release -a && uname -a && echo $(pwd) && php -v && php -m

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install dependencies
run: composer install --prefer-dist --no-progress --ignore-platform-req=php

- name: Copy phpunit and phpcs files
run: cp phpcs.xml.dist phpcs.xml && cp phpunit.xml.dist phpunit.xml

- name: Run ch-check
run: composer run-script cs-check

- name: Run cs-fix
run: composer run-script cs-fix

- name: PHPUnit Test
run: composer run-script test

0 comments on commit c0929a5

Please sign in to comment.