Skip to content

Merge pull request #34 from exonet/dependabot/github_actions/release-… #58

Merge pull request #34 from exonet/dependabot/github_actions/release-…

Merge pull request #34 from exonet/dependabot/github_actions/release-… #58

Workflow file for this run

---
name: CI
on:
push:
branches:
- master
pull_request:
types: [opened, edited, reopend, synchronize]
jobs:
test:
name: PHPUnit (PHP ${{ matrix.php-versions }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ["7.4", "8.0", "8.1"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: json, openssl, zlib, zip
- name: Composer install
uses: ramsey/composer-install@v2
with:
composer-options: "--no-scripts"
- name: Run unit tests
run: vendor/bin/phpunit --testdox
lint:
name: Check code style
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: json, openssl, zlib, zip
- name: Composer install
uses: ramsey/composer-install@v2
with:
composer-options: "--no-scripts"
- name: Run php-cs-fixer
run: vendor/bin/php-cs-fixer fix
- name: Apply php-cs-fixer changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply php-cs-fixer changes