Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: ci

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Install dependencies
run: composer install --no-progress

- name: Run lints
run: composer lint

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}

- name: Install dependencies
run: composer install --no-progress

- name: Run tests
run: composer test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignore composer files
/vendor/
composer.lock

# Ignore PHUnit caches
.phpunit.result.cache
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The official PHP library for Cryptopay API.
<a name="versions"></a>
### VERSIONS ###

Client works with PHP version 7.3 or higher and depends on:
Client works with PHP version 7.4 or higher and depends on:
* "guzzlehttp/guzzle": 7.2 or higher
* "vlucas/phpdotenv": "5.2" or higher
* "squizlabs/php_codesniffer": 3.5 or higher
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
"license": "MIT",
"minimum-stability": "stable",
"require": {
"php": "^7.3",
"php": ">=7.4",
"guzzlehttp/guzzle": "^7.2",
"squizlabs/php_codesniffer": "^3.5",
"ext-json": "*",
"vlucas/phpdotenv": "^5.2"
},
"require-dev": {
"phpunit/phpunit": "^9",
"mockery/mockery": "^1.4"
"mockery/mockery": "^1.4",
"squizlabs/php_codesniffer": "^3.5"
},
"scripts": {
"lint": "./vendor/bin/phpcs",
"lint": "./vendor/bin/phpcs .",
"lint-fix": "./vendor/bin/phpcbf .",
"test": "./vendor/bin/phpunit --verbose",
"coverage": "./vendor/bin/phpunit --coverage-text"
},
Expand Down
Loading