mirror of
https://github.com/anthonyaxenov/atol-online.git
synced 2024-11-26 11:24:02 +00:00
Compare commits
No commits in common. "1c0d8ba64d2c25ad40c3181fad3c5a5d3b504c5d" and "267431ec28bfdde212da615d348408dab76167e8" have entirely different histories.
1c0d8ba64d
...
267431ec28
49
.github/workflows/ci.yml
vendored
49
.github/workflows/ci.yml
vendored
@ -1,49 +0,0 @@
|
||||
# https://github.com/shivammathur/setup-php/blob/master/README.md
|
||||
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master, dev ]
|
||||
pull_request:
|
||||
branches: [ master, dev ]
|
||||
|
||||
jobs:
|
||||
Tests:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version:
|
||||
- 8.0
|
||||
- 8.1
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Cache Composer dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.composer/cache
|
||||
key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}
|
||||
restore-keys: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
|
||||
|
||||
- name: Setup PHP v ${{ matrix.php-version }}
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: json, curl, tokenizer, mbstring, xdebug
|
||||
coverage: xdebug
|
||||
tools: composer, phpunit
|
||||
|
||||
- name: Install dependencies with composer
|
||||
run: composer install --no-ansi --no-interaction --no-progress
|
||||
|
||||
- name: Run tests with phpunit/phpunit
|
||||
run: vendor/bin/phpunit --coverage-clover=coverage.xml --configuration=phpunit.xml
|
||||
|
||||
- name: Send code coverage report to Codecov.io
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
run: bash <(curl -s https://codecov.io/bash) || true
|
25
.github/workflows/dev.yml
vendored
Normal file
25
.github/workflows/dev.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
name: Dev build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ dev ]
|
||||
pull_request:
|
||||
branches: [ dev ]
|
||||
|
||||
jobs:
|
||||
Tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Validate composer.json and composer.lock
|
||||
uses: php-actions/composer@40-env
|
||||
with:
|
||||
version: 2
|
||||
php_version: 8.0
|
||||
only_args: --prefer-dist --no-progress
|
||||
|
||||
- name: Run phpunit tests
|
||||
uses: php-actions/phpunit@v9
|
||||
with:
|
||||
configuration: ./phpunit.xml
|
25
.github/workflows/master.yml
vendored
Normal file
25
.github/workflows/master.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
name: Master build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
Tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Validate composer.json and composer.lock
|
||||
uses: php-actions/composer@40-env
|
||||
with:
|
||||
version: 2
|
||||
php_version: 7.4
|
||||
only_args: --prefer-dist --no-progress
|
||||
|
||||
- name: Run phpunit tests
|
||||
uses: php-actions/phpunit@v8
|
||||
with:
|
||||
configuration: ./phpunit.xml
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,4 +5,3 @@
|
||||
/config.php
|
||||
*cache*
|
||||
/test.php
|
||||
/.coverage-report
|
||||
|
31
README.md
31
README.md
@ -1,6 +1,15 @@
|
||||
# АТОЛ Онлайн
|
||||
|
||||
[![Latest Stable Version](http://poser.pugx.org/axenov/atol-online/v)](https://packagist.org/packages/axenov/atol-online)
|
||||
---
|
||||
|
||||
**В этой ветке проводится глубокий рефакторинг, стабилизация и активная подготовка к `v1.0.0`. Документация
|
||||
актуализируется постепенно.**
|
||||
|
||||
---
|
||||
|
||||
[![Master build](https://github.com/anthonyaxenov/atol-online/actions/workflows/master.yml/badge.svg)](https://github.com/anthonyaxenov/atol-online/actions/workflows/master.yml)
|
||||
[![Dev build](https://github.com/anthonyaxenov/atol-online/actions/workflows/dev.yml/badge.svg)](https://github.com/anthonyaxenov/atol-online/actions/workflows/dev.yml)
|
||||
[![Latest Stable Version](http://poser.pugx.org/axenov/atol-online/v)](https://packagist.org/packages/axenov/atol-online)
|
||||
[![Latest Unstable Version](http://poser.pugx.org/axenov/atol-online/v/unstable)](https://packagist.org/packages/axenov/atol-online)
|
||||
[![Total Downloads](http://poser.pugx.org/axenov/atol-online/downloads)](https://packagist.org/packages/axenov/atol-online)
|
||||
[![License](http://poser.pugx.org/axenov/atol-online/license)](https://packagist.org/packages/axenov/atol-online)
|
||||
@ -9,17 +18,6 @@
|
||||
|
||||
**[Документация](/docs/readme.md)**
|
||||
|
||||
---
|
||||
|
||||
**В ветке `dev` проводится глубокий рефакторинг, стабилизация и активная подготовка к `v1.0.0`.
|
||||
Документация актуализируется постепенно.**
|
||||
|
||||
---
|
||||
|
||||
| master | [![CI](https://github.com/anthonyaxenov/atol-online/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/anthonyaxenov/atol-online/actions/workflows/ci.yml) | [![codecov](https://codecov.io/gh/anthonyaxenov/atol-online/branch/master/graph/badge.svg?token=WR2IV7FTF0)](https://codecov.io/gh/anthonyaxenov/atol-online) |
|
||||
|---|---|---|
|
||||
| dev | [![CI dev](https://github.com/anthonyaxenov/atol-online/actions/workflows/ci.yml/badge.svg?branch=dev)](https://github.com/anthonyaxenov/atol-online/actions/workflows/ci.yml) | [![codecov dev](https://codecov.io/gh/anthonyaxenov/atol-online/branch/dev/graph/badge.svg?token=WR2IV7FTF0)](https://codecov.io/gh/anthonyaxenov/atol-online) |
|
||||
|
||||
Текущие поддерживаемые версии АТОЛ Онлайн:
|
||||
|
||||
| Протокол | API | ФФД | Статус |
|
||||
@ -33,8 +31,8 @@
|
||||
* Фискализация докумнетов на облачной ККТ
|
||||
* Валидация данных до отправки документа на ККТ (насколько это возможно, согласно схеме)
|
||||
* Расчёты денег в копейках
|
||||
* Фактически полное покрытие тестами
|
||||
* PSR-4 автозагрузка
|
||||
<!--* Фактически полное покрытие тестами-->
|
||||
|
||||
## Системные требования
|
||||
|
||||
@ -65,15 +63,12 @@
|
||||
|
||||
Файлы тестов находятся в директории `/tests` корня репозитория.
|
||||
|
||||
Для запуска тестов необходимо перейти в корень репозитория и выполнить одну из команд:
|
||||
Для запуска тестов необходимо перейти в корень вашего проекта и выполнить команду:
|
||||
|
||||
```bash
|
||||
composer test # обычное тестирование
|
||||
composer test-cov # тестирование с покрытием
|
||||
composer test
|
||||
```
|
||||
|
||||
После тестирования с покрытием создаётся отчёт в директории `.coverage-report` в корне репозитория.
|
||||
|
||||
## Использование библиотеки
|
||||
|
||||
Весь исходный код находится в директории [`/src`](/src).
|
||||
|
@ -73,6 +73,6 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "vendor/bin/phpunit --colors=always",
|
||||
"test-cov": "php -dxdebug.mode=coverage vendor/bin/phpunit --coverage-html .coverage-report"
|
||||
"test-cov": "vendor/bin/phpunit --coverage-html coverage"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user