Redis connection fix #36
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
cache_key: cache-v1 | |
jobs: | |
lint: | |
runs-on: '${{ matrix.operating_system }}' | |
strategy: | |
matrix: | |
operating_system: | |
- ubuntu-20.04 | |
php_versions: | |
- '7.4' | |
fail-fast: false | |
name: 'Lint' | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v2 | |
- name: 'Setup PHP' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php_versions }} | |
- name: 'Install PHP dependencies with Composer' | |
run: composer install --prefer-dist --no-progress --no-suggest --optimize-autoloader | |
- name: 'Linting PHP source files' | |
run: 'vendor/bin/ecs check --config=ecs.php .' | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
operating_system: | |
- ubuntu-20.04 | |
php_versions: | |
- '7.4' | |
runs-on: '${{ matrix.operating_system }}' | |
name: 'Test / PHP ${{ matrix.php_versions }}' | |
needs: | |
- lint | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: 'Setup PHP' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php_versions }} | |
- name: 'Install PHP dependencies with Composer' | |
run: composer install --prefer-dist --no-progress --no-suggest --optimize-autoloader | |
- name: 'Run Unit Tests with PHPUnit' | |
run: | | |
cp phpunit.xml.dist phpunit.xml | |
./vendor/bin/phpunit \ | |
--verbose \ | |
--stderr \ | |
--coverage-clover build/logs/clover.xml \ | |
--coverage-text | |
- name: Upload coverage results to Coveralls | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_PARALLEL: true | |
COVERALLS_FLAG_NAME: php-${{ matrix.php_versions }} | |
run: ./vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v | |
coverage: | |
needs: test | |
runs-on: | |
- ubuntu-20.04 | |
name: "Code coverage" | |
steps: | |
- name: Coveralls | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true |