Skip to content

Commit

Permalink
Merge pull request #72 from spryker-eco/feature/dev-te-7947-add-githu…
Browse files Browse the repository at this point in the history
…b-action-and-remove-travis-from-eco

feature/dev-te-7947-add-github-action-and-remove-travis-from-eco
  • Loading branch information
spryker-release-bot authored Aug 18, 2021
2 parents 586a725 + 886eb76 commit e2b8f53
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 47 deletions.
146 changes: 102 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,60 +7,118 @@ on:
- master
workflow_dispatch:

env:
SPRYKER_TESTING_ENABLED: 1
APPLICATION_STORE: DE
POSTGRES_PORT: 5433
DB_USER: postgres
DB_NAME: DE_test_zed
DB_PASSWORD: pwd
MODULE_DIR: module
SHOP_DIR: current
MODULE_NAME: payone

jobs:
validation:
name: "Validation"
test_pgsql:
name: "Test / PostgreSQL"
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
include:
- php: '7.4'

php: [ '7.3', ]
product: [ 'suite' ]
composer_preference: ['', '--prefer-lowest']
services:
rabbitmq:
image: rabbitmq
ports:
- 5672:5672
redis:
image: redis
ports:
- 6379:6379
postgres:
image: postgres:12
env:
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }}
DB_USER: ${{ env.DB_USER }}
DB_NAME: ${{ env.DB_NAME }}
ports:
- 5433:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
APPLICATION_ENV: devtest
APPLICATION_STORE: DE
PROJECT: payone
PRODUCT_NAME: ${{ matrix.product }}
APPLICATION_ENV: ci.pgsql
steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl
tools: composer:v2

- name: 'Run Elasticsearch'
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 7.6.0

- name: Install eco-ci
run: git clone https://github.com/spryker-eco/eco-ci.git ecoci

- name: Execute test script
run: ./ecoci/build/ga.sh ${{ matrix.composer_preference }}
test_mariadb:
name: "Test / MariaDB"
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
php: [ '7.3', ]
product: [ 'suite' ]
composer_preference: [ '', '--prefer-lowest' ]
services:
rabbitmq:
image: rabbitmq
ports:
- 5672:5672
redis:
image: redis
ports:
- 6379:6379
env:
PRODUCT_NAME: ${{ matrix.product }}
APPLICATION_ENV: ci.mysql
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Composer get cache directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Composer cache
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Composer validate
run: composer validate
- uses: getong/[email protected]
with:
character set server: 'utf8'
collation server: 'utf8_general_ci'
mariadb version: '10.3'
mysql database: ${{ env.DB_NAME }}
mysql root password: ${{ env.DB_PASSWORD }}

- name: Composer install
run: |
composer --version
composer install
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl
tools: composer:v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl
tools: composer:v2

- name: Run CodeStyle checks
run: composer cs-check
- name: 'Run Elasticsearch'
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 7.6.0

- name: PHPStan setup
run: composer stan-setup
- name: Install eco-ci
run: git clone https://github.com/spryker-eco/eco-ci.git ecoci

- name: Run PHPStan
run: composer stan
- name: Execute test script
run: ./ecoci/build/ga.sh ${{ matrix.composer_preference }}
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,10 @@ protected function mapPaymentToAbstractAuthorization(
$authorizationContainer->setAmount($paymentDetailEntity->getAmount());
$authorizationContainer->setCurrency($this->getStandardParameter()->getCurrency());
$authorizationContainer->setClearingType(PayoneApiConstants::CLEARING_TYPE_FINANCING);
$authorizationContainer->setFinancingType($paymentDetailEntity->getPayMethod());

$authorizationContainer->setReference($paymentEntity->getReference());

$paydataContainer = new PaydataContainer();
$paydataContainer->setAuthorizationToken($paymentDetailEntity->getToken());
$authorizationContainer->setPaydata($paydataContainer);

$personalContainer = $this->buildPersonalContainer($paymentEntity);
Expand Down
2 changes: 1 addition & 1 deletion src/SprykerEco/Zed/Payone/Persistence/PayoneRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ protected function createPaymentPayoneApiLogQueryByOrderIds($orderTransfers): Sp
}

/**
* @param \ArrayObject\Generated\Shared\Transfer\OrderTransfer[] $orderTransfers
* @param \ArrayObject|\Generated\Shared\Transfer\OrderTransfer[] $orderTransfers
*
* @return \Orm\Zed\Payone\Persistence\SpyPaymentPayoneTransactionStatusLogQuery
*/
Expand Down

0 comments on commit e2b8f53

Please sign in to comment.