Skip to content

Commit

Permalink
Merge pull request #8 from Yproximite/build/php8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RomulusED69 authored Aug 12, 2021
2 parents 28a6325 + c800de3 commit 8938f58
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 17 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: CI

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

env:
TZ: UTC

COMPOSER_MEMORY_LIMIT: -1

jobs:
static_analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v1
with:
php-version: 7.4
ini-values: date.timezone=${{ env.TZ }}, memory_limit=-1, session.gc_probability=0, opcache.enable=1, opcache.enable_cli=1, opcache.memory_consumption=256, opcache.max_accelerated_files=20000, opcache.validate_timestamps=0, realpath_cache_size=4096K, realpath_cache_ttl=600

- run: composer install --prefer-dist --no-interaction --no-progress

- run: composer validate --strict

- run: composer php-cs-fixer@ci

- run: composer phpspec run -n

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
# Minimum supported dependencies with the latest and oldest PHP version
- PHP_VERSION: 7.4
COMPOSER_FLAGS: --prefer-stable --prefer-lowest
- PHP_VERSION: 8.0
COMPOSER_FLAGS: --prefer-stable --prefer-lowest

# Test the latest stable release
- PHP_VERSION: 7.4
- PHP_VERSION: 8.0
COVERAGE: true
PHPUNIT_FLAGS: -v --coverage-text

# Test specific Symfony versions
- PHP_VERSION: 7.4
SYMFONY_VERSION: 4.4.* # Last 4.x version
- PHP_VERSION: 8.0
SYMFONY_VERSION: 4.4.* # Last 4.x version
- PHP_VERSION: 7.4
SYMFONY_VERSION: 5.3.*
- PHP_VERSION: 8.0
SYMFONY_VERSION: 5.3.*

steps:
- uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.config.PHP_VERSION }}
coverage: ${{ matrix.config.COVERAGE }}
ini-values: date.timezone=${{ env.TZ }}, memory_limit=-1, session.gc_probability=0, opcache.enable=1, opcache.enable_cli=1, opcache.memory_consumption=256, opcache.max_accelerated_files=20000, opcache.validate_timestamps=0, realpath_cache_size=4096K, realpath_cache_ttl=600

- name: Install globally Symfony Flex
run: composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-main
# continue-on-error: ${{ matrix.config.ALLOWED_TO_FAIL == true }}

- name: Configure Composer minimum stability
if: matrix.config.STABILITY
run: composer config minimum-stability ${{ matrix.config.STABILITY }}
# continue-on-error: ${{ matrix.config.ALLOWED_TO_FAIL == true }}

- name: Limit to specific Symfony version
if: matrix.config.SYMFONY_VERSION
run: echo "SYMFONY_REQUIRE=${{ matrix.config.SYMFONY_VERSION }}" >> $GITHUB_ENV
# continue-on-error: ${{ matrix.config.ALLOWED_TO_FAIL == true }}

- name: Install composer dependencies
run: composer update ${{ matrix.config.COMPOSER_FLAGS }} --prefer-dist --no-interaction --no-progress
# continue-on-error: ${{ matrix.config.ALLOWED_TO_FAIL == true }}

- name: Run PHPspec
run: composer phpspec
# continue-on-error: ${{ matrix.config.ALLOWED_TO_FAIL == true }}
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ekomi-api
=========
![CI (master)](https://github.com/Yproximite/ZohoSubscription/workflows/CI/badge.svg)
![](https://img.shields.io/badge/php-%5E7.4%20%7C%7C%20%5E8.0-blue)

PHP Library to get v3 API

Expand Down
18 changes: 14 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,29 @@
"email": "mail.sviridenko@gmail.com"
}
],
"config": {
"bin-dir": "bin",
"sort-packages": true
},
"scripts": {
"php-cs-fixer": "php-cs-fixer fix -v",
"php-cs-fixer@ci": "php-cs-fixer fix -v --diff --dry-run",
"phpspec": "phpspec run -n"
},
"require": {
"php": "^7.1",
"php": "^7.4||^8.0",
"php-http/message-factory": "^1.0.2",
"php-http/httplug": "^1.0||^2.0",
"php-http/discovery": "^1.0",
"psr/cache": "^1.0",
"symfony/cache": "^4.0|^5.0"
"symfony/cache": "^4.4||^5.3"
},
"require-dev": {
"phpspec/phpspec": "^6.0",
"phpspec/phpspec": "^7.0",
"php-http/message": "^1.0",
"php-http/guzzle6-adapter": "^1.0||^2.0",
"friendsofphp/php-cs-fixer": "^2.16"
"friendsofphp/php-cs-fixer": "^2.16",
"symfony/var-dumper": "^4.4||^5.3"
},
"config": {
"bin-dir": "bin"
Expand Down

0 comments on commit 8938f58

Please sign in to comment.