diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..995cd22 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,47 @@ +name: Test + +on: + push: + branches: + - "master" + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + php: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1] + + name: PHP:${{ matrix.php }} + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP, with composer + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + tools: composer:v2 + coverage: xdebug + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache composer dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + restore-keys: dependencies-php-${{ matrix.php }}-composer- + + - name: Install Composer dependencies + run: | + composer install --prefer-dist --no-interaction --no-suggest + + - name: Run Unit tests + run: | + vendor/bin/phpunit \ No newline at end of file diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index 8fc4ba8..0000000 --- a/.styleci.yml +++ /dev/null @@ -1,65 +0,0 @@ -preset: none -enabled: - - array_element_white_space_after_comma - - blankline_after_open_tag - - braces - - concat_without_spaces - - double_arrow_multiline_whitespaces - - duplicate_semicolon - - elseif - - empty_return - - encoding - - eof_ending - - function_call_space - - function_declaration - - include - - indentation - - join_function - - line_after_namespace - - linefeed - - list_commas - - logical_not_operators_with_successor_space - - short_array_syntax - - lowercase_constants - - lowercase_keywords - - method_argument_space - - multiline_array_trailing_comma - - multiline_spaces_before_semicolon - - multiple_use - - namespace_no_leading_whitespace - - no_blank_lines_after_class_opening - - no_empty_lines_after_phpdocs - - no_extra_consecutive_blank_lines - - object_operator - - operators_spaces - - ordered_use - - parenthesis - - phpdoc_indent - - phpdoc_inline_tag - - phpdoc_no_access - - phpdoc_no_package - - phpdoc_scalar - - phpdoc_short_description - - phpdoc_to_comment - - phpdoc_trim - - phpdoc_type_to_var - - phpdoc_var_without_name - - remove_leading_slash_use - - return - - self_accessor - - short_echo_tag - - short_tag - - single_array_no_trailing_comma - - single_blank_line_before_namespace - - single_line_after_imports - - single_quote - - spaces_before_semicolon - - spaces_cast - - standardize_not_equal - - ternary_spaces - - trailing_spaces - - trim_array_spaces - - unalign_equals - - unary_operators_spaces - - visibility - - whitespacy_lines \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 02ecac2..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: php - -matrix: - include: - - php: 5.5 - - php: 5.6 - - php: 7.0 - - php: 7.1 - - php: 7.2 - - php: 7.3 - - php: 7.4 - - php: nightly - allow_failures: - - php: nightly - fast_finish: true - -before_script: - - travis_retry composer self-update - - travis_retry composer install --prefer-source --no-interaction --dev - -script: vendor/bin/phpunit diff --git a/README.md b/README.md index de9e23b..e513659 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ Laravel Crawler Detect ======= -[![Build Status](https://img.shields.io/travis/JayBizzle/Laravel-Crawler-Detect/master.svg?style=flat-square)](https://travis-ci.org/JayBizzle/Laravel-Crawler-Detect) [![Total Downloads](https://img.shields.io/packagist/dt/JayBizzle/Laravel-Crawler-Detect.svg?style=flat-square)](https://packagist.org/packages/jaybizzle/laravel-crawler-detect) +[![Total Downloads](https://img.shields.io/packagist/dt/JayBizzle/Laravel-Crawler-Detect.svg?style=flat-square)](https://packagist.org/packages/jaybizzle/laravel-crawler-detect) [![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/JayBizzle/Laravel-Crawler-Detect.svg?style=flat-square)](https://scrutinizer-ci.com/g/JayBizzle/Laravel-Crawler-Detect/?branch=master) [![StyleCI](https://styleci.io/repos/32484055/shield)](https://styleci.io/repos/32484055) A Laravel wrapper for [CrawlerDetect](https://github.com/JayBizzle/Crawler-Detect) - the web crawler detection library diff --git a/composer.json b/composer.json index 7a49cab..ae89111 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ "jaybizzle/crawler-detect": "1.*" }, "require-dev": { - "orchestra/testbench": "^3.2|^3.4", - "phpunit/phpunit": "^4.8|^5.5|^6.5" + "orchestra/testbench": "^2.0|^3.2|^3.4|^4.0|^5.0|^6.0", + "phpunit/phpunit": "^4.8|^5.5|^6.5|^9.4" }, "autoload": { "psr-4": { diff --git a/tests/UATests.php b/tests/UATests.php index b7262d2..9b89095 100644 --- a/tests/UATests.php +++ b/tests/UATests.php @@ -1,12 +1,9 @@ LaravelCrawlerDetect = new CrawlerDetect(); - } - protected function getEnvironmentSetUp($app) { // reset base path to point to our package's src directory