diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..f99a2a9 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,53 @@ +name: Continuous Integration + +on: ['push', 'pull_request'] + +jobs: + ci: + runs-on: ubuntu-latest + + strategy: + matrix: + php: [7.4] + laravel: [7.*, 6.*, 5.8.*, 5.7.*, 5.6.*] + dependency-version: [prefer-stable] + include: + - laravel: 7.* + testbench: 5.* + - laravel: 6.* + testbench: 4.* + - laravel: 5.8.* + testbench: 3.8.* + - laravel: 5.7.* + testbench: 3.7.* + - laravel: 5.6.* + testbench: 3.6.* + + name: CI - PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - Testbench ${{ matrix.testbench }} (${{ matrix.dependency-version }}) + + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: mbstring, zip + tools: prestissimo + coverage: pcov + + - name: Install Composer dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist --no-suggest + + - name: PHPUnit Testing + run: vendor/bin/phpunit diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f6071ca..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: php - -matrix: - fast_finish: true - include: - - php: 7.4 - env: LARAVEL='5.6.*' TESTBENCH='3.6.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.4 - env: LARAVEL='5.7.*' TESTBENCH='3.7.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.4 - env: LARAVEL='5.8.*' TESTBENCH='3.8.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.4 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.4 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable' - - allow_failures: - - php: 7.4snapshot - -before_install: - - travis_retry composer self-update - - travis_retry composer require --no-update --no-interaction "laravel/framework:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" - -install: - - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction --no-suggest - -script: - - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover diff --git a/CHANGELOG.md b/CHANGELOG.md index a0b375e..3ef965f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to `mateusjunges/laravel-invite-codes` will be documented in this file. +## 1.2.2 2020-11-03 +- Change test suite to run on github actions instead of TravisCi + ## 1.2.1 2020-03-08 - Ensure all generated codes are unique (#12) diff --git a/README.md b/README.md index bd9b54e..b553608 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ This package allows you to easily manage invite codes for your Laravel applicati Latest Stable Version License - Build Status + + Continuos integration

# Documentation