Skip to content

composer(deps): update symfony/http-client requirement from ^4.4 || ^… #251

composer(deps): update symfony/http-client requirement from ^4.4 || ^…

composer(deps): update symfony/http-client requirement from ^4.4 || ^… #251

Workflow file for this run

# https://docs.github.com/en/actions
name: Tests
on:
push:
pull_request:
branches: [ main ]
env:
PHP_EXTENSIONS: curl
PHP_EXTENSIONS_CACHE_KEY: cache-php-extensions-v1
jobs:
phpunit:
name: Code tests (PHP ${{ matrix.php }}) - ${{ matrix.dependency-version }}
runs-on: ubuntu-20.04
strategy:
max-parallel: 10
matrix:
php:
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
include:
- php: '7.4'
coverage: true
dependency-version: [prefer-lowest, prefer-stable]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup php extension cache environment
if: ${{ vars.USE_PHP_EXTENSION_CACHE }}
id: cache-php-extensions
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.PHP_EXTENSIONS }}
key: ${{ env.PHP_EXTENSIONS_CACHE_KEY }}-${{ matrix.php }}
- name: Cache PHP extensions
if: ${{ vars.USE_PHP_EXTENSION_CACHE }}
uses: actions/cache@v3
with:
path: ${{ steps.cache-php-extensions.outputs.dir }}
key: ${{ steps.cache-php-extensions.outputs.key }}
restore-keys: ${{ steps.cache-php-extensions.outputs.key }}
- name: setup-php
id: setup-php
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: date.timezone=Europe/Rome, memory_limit=-1
coverage: xdebug
- name: Set Composer Cache Directory
if: ${{ vars.USE_COMPOSER_CACHE }}
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer dependencies
uses: actions/cache@v3
if: ${{ vars.USE_COMPOSER_CACHE }}
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-composer-
- name: Install Composer dependencies
run: |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress --ansi --no-scripts
composer bin all install
- name: Run unit test
run: |
./vendor/bin/phpunit
- name: Run unit test WITH COVERAGE
if: ${{ (matrix.coverage == true) }}
run: |
mkdir -p reports/phpunit
./vendor/bin/phpunit --coverage-clover reports/phpunit/unit-test-clover.xml --log-junit reports/phpunit/unit-test-junit.xml
- name: Upload unit tests coverage to Codecov
if: ${{ (matrix.coverage == true) }}
uses: codecov/codecov-action@v3
with:
files: ./reports/phpunit/unit-test-clover.xml
flags: unit-tests
name: codecov-php-7.4
fail_ci_if_error: true
- name: SonarCloud Scan And publication
if: ${{ (matrix.coverage == true) }}
uses: sonarsource/sonarcloud-github-action@master
with:
projectBaseDir: ./
args: >
-Dsonar.organization=medicalmundi
-Dsonar.projectKey=MedicalMundi_php-access-gudid-consumer
-Dsonar.projectName=php-access-gudid-consumer
-Dsonar.links.homepage=https://github.com/MedicalMundi/php-access-gudid-consumer
-Dsonar.links.ci=https://travis-ci.org/github/MedicalMundi/php-access-gudid-consumer
-Dsonar.links.scm=https://github.com/MedicalMundi/php-access-gudid-consumer
-Dsonar.links.issue=https://github.com/MedicalMundi/php-access-gudid-consumer/issues
-Dsonar.sourceEncoding=UTF-8
-Dsonar.language=php
-Dsonar.sources=src/
-Dsonar.tests=tests/
-Dsonar.exclusion=docs/
-Dsonar.php.coverage.reportPaths=reports/phpunit/unit-test-clover.xml
-Dsonar.php.tests.reportPath=reports/phpunit/test-report.xml
-Dsonar.verbose=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
continue-on-error: true