Skip to content

Commit

Permalink
updated configs
Browse files Browse the repository at this point in the history
  • Loading branch information
vasildakov committed Dec 26, 2023
1 parent 6f49d3c commit dd35f71
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 2 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: PHP Composer

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest, macos-latest ]
php-versions: [ '8.2' ]
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
ini-values: post_max_size=256M, short_open_tag=On
coverage: xdebug
tools: php-cs-fixer, phpunit

- name: Check PHP Version
run: php -v

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run-script test
33 changes: 33 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
checks:
php: true

filter:
paths:
- src/*

build:
environment:
php:
version: 8.2
ini:
xdebug.mode: coverage

nodes:
analysis:
tests:
override:
- php-scrutinizer-run

phpunit:
dependencies:
override:
- composer self-update
- composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

tests:
override:
- command: ./vendor/bin/phpunit --coverage-clover ./coverage.xml
on_node: 1
coverage:
file: coverage.xml
format: php-clover
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
# econt
Econt Client
# Econt API Client

## Features

This library is compliant with [PSR-7: HTTP message interfaces](https://www.php-fig.org/psr/psr-7/), [PSR-17: HTTP Factories](https://www.php-fig.org/psr/psr-17/) and [PSR-18: HTTP Client](https://www.php-fig.org/psr/psr-18/)


## Installation

Using Composer:

```
$ composer require vasildakov/econt
```

0 comments on commit dd35f71

Please sign in to comment.