diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..06f7a33 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,58 @@ +name: CI + +on: + push: + branches: + - 'master' + pull_request: + workflow_dispatch: + +jobs: + validation: + name: Validation + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + extensions: mbstring, intl, bcmath + coverage: none + + - name: Composer Install + run: composer install --prefer-dist --no-interaction --profile + + - name: Run validation + run: composer validate + + - name: Syntax check + 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" ) + + lowest: + name: Prefer Lowest + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.3' + extensions: mbstring, intl, bcmath + coverage: none + + - name: Composer Install + run: composer install --prefer-dist --no-interaction --profile + + - name: Composer Update + run: composer update --prefer-lowest --prefer-dist --no-interaction --profile -vvv + + - name: Composer Install prefer lowest tool + run: composer require --dev dereuromark/composer-prefer-lowest; + + - name: Run validation + run: vendor/bin/validate-prefer-lowest -m diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6c176e1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -language: php - -php: - - 7.3 - - 7.4 - -matrix: - fast_finish: true - - include: - - php: 7.3 - env: PREFER_LOWEST=1 - -env: - global: - - APPLICATION_ENV=development - - APPLICATION_STORE=DE - -before_install: - - phpenv config-rm xdebug.ini - -install: - - COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist --no-interaction - - if [[ $PREFER_LOWEST == 1 ]]; then COMPOSER_MEMORY_LIMIT=-1 composer update --prefer-lowest --prefer-stable --prefer-dist --no-interaction ; fi - - if [[ $PREFER_LOWEST == 1 ]]; then COMPOSER_MEMORY_LIMIT=-1 composer require --dev dereuromark/composer-prefer-lowest; fi - -script: - - find ./src -path src -prune -o -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) - - - if [[ $PREFER_LOWEST == 1 ]]; then vendor/bin/validate-prefer-lowest || true; fi - -cache: - directories: - - $HOME/.composer/cache/ - -notifications: - email: false diff --git a/README.md b/README.md index becb149..35aa2a0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # ProductList Module -[![Build Status](https://travis-ci.org/spryker/product-list.svg)](https://travis-ci.org/spryker/product-list) +[![Latest Stable Version](https://poser.pugx.org/spryker/product-list/v/stable.svg)](https://packagist.org/packages/spryker/product-list) [![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.3-8892BF.svg)](https://php.net/) ProductList provides infrastructure and functionality to handle white/black lists of a concrete products for a specific merchants.