diff --git a/.github/workflows/composer.yml b/.github/workflows/composer.yml new file mode 100644 index 0000000..9337f16 --- /dev/null +++ b/.github/workflows/composer.yml @@ -0,0 +1,33 @@ +name: Composer outdated + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: [ '7.1', '7.2', '7.3', '7.4' ] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - name: Validate composer.json + run: composer validate --strict + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-interaction + + - name: Composer outdated + run: composer outdated -D --strict diff --git a/.github/workflows/extensions_finder.yml b/.github/workflows/extensions_finder.yml new file mode 100644 index 0000000..7bb4dbb --- /dev/null +++ b/.github/workflows/extensions_finder.yml @@ -0,0 +1,33 @@ +name: Extensions finder + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: [ '7.1', '7.2', '7.3', '7.4' ] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - name: Validate composer.json + run: composer validate --strict + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-interaction + + - name: PHP extensions finder + run: vendor/bin/php-extensions-finder check src bin tests diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 0000000..0e5f2a7 --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,36 @@ +name: PHPstan + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: [ '7.1', '7.2', '7.3', '7.4' ] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - name: Validate composer.json + run: composer validate --strict + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-interaction + + - name: Install PHPStan + run: composer require phpstan/phpstan --dev + + - name: PHPStan analyse + run: vendor/bin/phpstan analyze src --level=max --no-progress diff --git a/.github/workflows/sniffer.yml b/.github/workflows/sniffer.yml new file mode 100644 index 0000000..1a713fa --- /dev/null +++ b/.github/workflows/sniffer.yml @@ -0,0 +1,33 @@ +name: Sniffer + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: [ '7.1', '7.2', '7.3', '7.4' ] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - name: Validate composer.json + run: composer validate --strict + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-interaction + + - name: Check syntax + run: find src bin tests -name "*.php" -print0 | xargs -0 -n1 -P8 php -l diff --git a/.github/workflows/syntax_checker.yml b/.github/workflows/syntax_checker.yml new file mode 100644 index 0000000..8b206d8 --- /dev/null +++ b/.github/workflows/syntax_checker.yml @@ -0,0 +1,33 @@ +name: Syntax checker + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: [ '7.1', '7.2', '7.3', '7.4' ] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - name: Validate composer.json + run: composer validate --strict + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-interaction + + - name: Code sniffer + run: vendor/bin/phpcs src bin --standard=PSR2 -n diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index df6cfa0..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,25 +0,0 @@ -filter: - excluded_paths: [tests/*] - -checks: - php: - remove_extra_empty_lines: true - remove_php_closing_tag: true - remove_trailing_whitespace: true - fix_use_statements: - remove_unused: true - preserve_multiple: false - preserve_blanklines: true - order_alphabetically: true - fix_php_opening_tag: true - fix_linefeed: true - fix_line_ending: true - fix_identation_4spaces: true - fix_doc_comments: true - code_rating: true - duplication: true - -tools: - external_code_coverage: - timeout: 600 - runs: 2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6f48df4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: php - -services: - - mysql - -php: - - 7.1 - - 7.2 - - 7.3 - - 7.4 - -sudo: false - -before_script: - - travis_retry composer self-update - - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction - -script: - - mkdir -p build/logs - - php vendor/bin/phpcs src/ --standard=PSR2 -n - - mysql -u root -e "DROP DATABASE IF EXISTS parallel_test" - - mysql -u root -e "CREATE DATABASE parallel_test" -# - mysql -u root parallel_test < tests/Data/structure.sql - - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover - -after_script: - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover coverage.clover