Merge pull request #57 from omnimail/eileenmcnaughton-patch-1 #48
This file contains hidden or 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: CI | |
# When to trigger this workflow | |
on: [push, pull_request] | |
# Define all jobs | |
jobs: | |
run: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest] | |
php-versions: ['7.3', '7.4'] | |
# Running on multiple OS and on multiple PHP version | |
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} | |
steps: | |
# Checkout latest commit | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Setup PHP | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: xdebug | |
# Install composer | |
- name: Install composer | |
run: curl --show-error --silent https://getcomposer.org/installer | php | |
# Install all dependencies | |
- name: Install composer dependencies | |
run: php composer.phar install | |
# PHP CS check | |
- name: Run PHP Coding Standard Checking | |
run: ./vendor/bin/phpcs src/ -n | |
# Unit Testing | |
- name: Run PHPUnit tests | |
run: ./vendor/bin/phpunit --configuration ./phpunit.xml.dist | |
# Coverage report upload to scrutinizer for code ratings | |
- name: Downloading scrutinizer ocular.phar | |
run: wget https://scrutinizer-ci.com/ocular.phar | |
- name: Uploading code coverage to scrutinize | |
run: php ocular.phar code-coverage:upload --format=php-clover ./build/coverage/log/coverage.xml |