Skip to content

support psr/http-message 2.0 #156

support psr/http-message 2.0

support psr/http-message 2.0 #156

Workflow file for this run

name: CI
on:
push:
branches:
- master
paths-ignore:
- "**/*.md"
- "LICENSE"
pull_request:
jobs:
test:
name: Zipkin PHP (PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }})
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ["7.4", "8.0", "8.1"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug #optional
extensions: mysql
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: |
composer install --no-progress --prefer-dist --optimize-autoloader
- name: Run lint
if: matrix.operating-system != 'windows-latest'
run: composer lint
- name: Run static check
run: composer static-check
- name: Run tests
run: composer test -- --coverage-clover=build/logs/clover.xml
- name: Upload coverage report to codecov service
if: ${{ matrix.operating-system == 'ubuntu-latest' && matrix.php-versions == '8.0' }}
run: |
wget -c -nc --retry-connrefused --tries=0 https://github.com/satooshi/php-coveralls/releases/download/v2.4.3/php-coveralls.phar
chmod +x php-coveralls.phar
php php-coveralls.phar --version
mkdir -p build/logs
php php-coveralls.phar -v
bash <(curl -s https://codecov.io/bash)
env:
# Running coveralls with default config did not work so followed the workaround below:
# https://github.com/php-coveralls/php-coveralls/issues/273#issuecomment-537473525
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}