Added supported PHP versions and minor improvement for header #188
This file contains 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: build | |
on: | |
push: | |
branches: [ "master", "*.x" ] | |
pull_request: | |
branches: [ "master", "*.x" ] | |
env: | |
fail-fast: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: | |
- "7.1" | |
- "7.2" | |
- "7.3" | |
- "7.4" | |
- "8.0" | |
- "8.1" | |
- "8.2" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "${{ matrix.php-version }}" | |
coverage: xdebug | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v2 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php-${{ matrix.php-version }} | |
- name: Install dependencies | |
run: composer update --prefer-dist --no-progress | |
- name: Run test suite | |
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml | |
- name: Run coding style check | |
run: ./vendor/bin/phpcs --standard=PSR1 src/ | |
- name: Publish to coveralls.io | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./vendor/bin/php-coveralls -o coveralls.json -x coverage.xml -vvv |