mailgun-php/.github/workflows/php.yml
Tobias Nyholm 12ed8aae43
Updating workflows and add psalm (#741)
* Updating workflows and add psalm

* Normalize composer

* Fixed CS
2021-01-30 12:43:12 +01:00

55 lines
1.5 KiB
YAML

name: Tests
on:
push: ~
pull_request: ~
jobs:
php:
strategy:
matrix:
php-versions: [ '7.3', '7.4', '8.0' ]
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: none
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: PHP Unit Tests
run: vendor/bin/phpunit
lowest:
name: Lowest deps
runs-on: ubuntu-latest
steps:
- name: Set up PHP
uses: shivammathur/setup-php@2.9.0
with:
php-version: 7.4
coverage: pcov
- name: Checkout code
uses: actions/checkout@v2
- name: Download dependencies
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable --prefer-lowest
- name: Run tests
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml
- name: Scrunitizer CI
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.xml