woocommerce-paypal-payments/.github/workflows/php.yml

37 lines
791 B
YAML

name: PHP Composer
on:
push:
branches: [ trunk ]
pull_request:
branches: [ trunk ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.1', '7.2', '7.3', '7.4']
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
uses: ramsey/composer-install@v1
with:
composer-options: "--prefer-dist"
- name: Run test suite
run: ./vendor/bin/phpunit
- name: Run Woocommerce coding standards
run: ./vendor/bin/phpcs src modules woocommerce-paypal-payments.php --extensions=php