Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add using github actions #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on:
push:
branches:
tags:
pull_request:

env:
DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-ansi --no-progress --no-suggest"

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4]
os: [ubuntu-latest]
env: [
'low',
'high',
]
name: PHP ${{ matrix.php }} Test ${{ matrix.env }} on ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, mbstring

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Composer update with high level
run: |
if [ "$DEPENDENCIES" = 'high' ]; then
composer update $DEFAULT_COMPOSER_FLAGS
fi;

if [ "$DEPENDENCIES" = 'low' ]; then
composer update $DEFAULT_COMPOSER_FLAGS --prefer-lowest
fi;
env:
DEPENDENCIES: ${{ matrix.env}}
- name: Run tests
run: ./vendor/bin/phpunit

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Lamoda CRPT OMS Api Client
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/lamoda/crpt-oms-api-client/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/lamoda/crpt-oms-api-client/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/lamoda/crpt-oms-api-client/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/lamoda/crpt-oms-api-client/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/lamoda/crpt-oms-api-client/badges/build.png?b=master)](https://scrutinizer-ci.com/g/lamoda/crpt-oms-api-client/build-status/master)
[![Build Status](https://github.com/lamoda/crpt-oms-api-client/workflows/CI/badge.svg?branch=master)](https://github.com/lamoda/crpt-oms-api-client/workflows/CI/badge.svg?branch=master)

## Installation

Expand Down Expand Up @@ -51,6 +52,6 @@ $omsApi = new OmsApi($client, $serializer);

It is also possible to send signed OMS requests for orders.

To do that implement `\Lamoda\OmsClient\V2\Signer\SignerInterface`.
To do that implement `\Lamoda\OmsClient\V2\Signer\SignerInterface`.

Signer must return signature for the given data (no data itself transformation is required).