Skip to content

Commit

Permalink
Merge d0b39e2 into 28d151f
Browse files Browse the repository at this point in the history
  • Loading branch information
typhonius committed Oct 8, 2020
2 parents 28d151f + d0b39e2 commit fe8c519
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/php.yml
@@ -0,0 +1,65 @@
name: PHP Composer

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, macos-latest]
php-versions: ['7.3', '7.4']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
ini-values: post_max_size=256M, short_open_tag=On


- name: Setup PHP with pecl extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: pecl
extensions: pcov

- 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-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-versions }}-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-source --no-progress --no-suggest --no-interaction

- name: Setup PCOV
run: |
composer require pcov/clobber
vendor/bin/pcov clobber
- name: Run test suite
run: composer run-script test

- name: Install Phar tools and build deployment artefact.
run: |
composer phar:install-tools
rm -rf vendor/*
composer install --prefer-dist --no-dev --no-interaction
composer phar:build

0 comments on commit fe8c519

Please sign in to comment.