Skip to content

Merge pull request #80 from henriquemoody/php-versions #168

Merge pull request #80 from henriquemoody/php-versions

Merge pull request #80 from henriquemoody/php-versions #168

name: Continuous integration
on:
push:
branches: [ "4.0" ]
pull_request:
branches: [ "4.0" ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
ini-values: post_max_size=256M, max_execution_time=180
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-composer-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-composer-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --dev --prefer-dist --no-progress --no-suggest
- name: Configure locale
run: sudo locale-gen uk_UA.UTF-8
- name: Run test suite
run: composer test
codeCoverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
- name: Configure locale
run: sudo locale-gen uk_UA.UTF-8
- name: Prepare dir
run: mkdir -p build/logs
- name: Get code coverage report
run: composer cover
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: composer coveralls
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
ini-values: post_max_size=256M, max_execution_time=180
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run style checks
run: composer check-style
- name: Run static analyse
run: composer psalm