Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
113 changed files
with
3,871 additions
and
687 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
name: CI | ||
|
||
env: | ||
APPLICATION_ENV: 'development' | ||
APPLICATION_STORE: 'DE' | ||
PROJECT: 'Crefo-pay' | ||
DATABASE_VERSION: 10.2 | ||
DATABASE_HOST: 127.0.0.1 | ||
DATABASE_PORT: 3306 | ||
DATABASE_NAME: eu-docker | ||
DATABASE_USERNAME: root | ||
DATABASE_PASSWORD: secret | ||
DATABASE_ROOT_PASSWORD: secret | ||
DATABASE_ALLOW_EMPTY_PASSWORD: false | ||
DATABASE_CHARACTER_SET: utf8 | ||
DATABASE_COLLATE: utf8_general_ci | ||
MYSQL_ALLOW_EMPTY_PASSWORD: false | ||
MYSQL_ROOT_PASSWORD: secret | ||
MYSQL_DATABASE: eu-docker | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
ci: | ||
name: Crefo-pay | ||
runs-on: ubuntu-18.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: | ||
- '7.4' | ||
- '8.0' | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Database | ||
uses: getong/mariadb-action@v1.1 | ||
with: | ||
host port: ${{ env.DATABASE_PORT }} | ||
container port: ${{ env.DATABASE_PORT }} | ||
character set server: ${{ env.DATABASE_CHARACTER_SET }} | ||
collation server: ${{ env.DATABASE_COLLATE }} | ||
mariadb version: ${{ env.DATABASE_VERSION }} | ||
mysql database: ${{ env.DATABASE_NAME }} | ||
mysql root password: ${{ env.DATABASE_ROOT_PASSWORD }} | ||
mysql user: ${{ env.DATABASE_USERNAME }} | ||
mysql password: ${{ env.DATABASE_PASSWORD }} | ||
|
||
- name: Setup PHP ${{ matrix.php-versions }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: mbstring, intl, bcmath, pdo_mysql | ||
|
||
- 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 | ||
|
||
- name: Composer version | ||
run: composer --version | ||
|
||
- name: Composer install | ||
run: composer install --prefer-dist --no-interaction --optimize-autoloader | ||
|
||
- name: PHP syntax validation | ||
run: find ./src -path src -prune -o -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) | ||
|
||
- name: Run codeception tests | ||
run: composer test | ||
|
||
- name: Run PHPStan checks | ||
run: composer stan | ||
|
||
- name: Check codestyle checks | ||
run: composer cs-check | ||
|
||
prefer-lowest: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
extensions: mbstring, intl, pdo_mysql | ||
|
||
- name: Composer prefer lowest | ||
run: composer lowest-setup | ||
|
||
- name: Run PHPStan (currently not running properly) | ||
run: composer stan || true | ||
|
||
- name: Validate prefer lowest | ||
run: vendor/bin/validate-prefer-lowest -m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
build: | ||
environment: | ||
php: '7.3' | ||
php: '7.4' | ||
|
||
tests: | ||
override: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
parameters: | ||
bootstrap: %rootDir%/../../../phpstan-bootstrap.php | ||
level: 7 | ||
paths: | ||
- src/ | ||
bootstrapFiles: | ||
- tests/bootstrap.php | ||
checkGenericClassInNonGenericObjectType: false | ||
checkMissingIterableValueType: false | ||
ignoreErrors: | ||
- '#Call to method .+\(\) on an unknown class Generated\\.+#' | ||
- '#Call to an undefined method .+useSpyPaymentCrefoPayApiLogQuery\(\)\.+#' | ||
- '#Call to an undefined method .+useSpyPaymentCrefoPayNotificationQuery\(\)\.+#' | ||
- '#Parameter \#1 \$object_or_.+ of function is_a expects object\|string, float\|null given.#' | ||
excludePaths: | ||
- src/SprykerEco/Zed/CrefoPay/Persistence/Propel/Abstract*.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.