From edf3987d97aeb60a729656c92e40faa9c18fe8aa Mon Sep 17 00:00:00 2001 From: bensinclair Date: Fri, 27 Nov 2020 14:48:08 +1000 Subject: [PATCH 1/4] Add Github Actions test workflow --- .github/workflows/tests.yml | 48 +++++++++++++++++++++++++++++++++++++ .travis.yml | 16 ------------- composer.json | 2 +- 3 files changed, 49 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..498e827 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,48 @@ +name: Run Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + matrix: + php-versions: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' ] + name: PHP ${{ matrix.php-versions }} + + steps: + - uses: actions/checkout@v2 + name: Check Out Code + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Setup Composer Access + run: composer config -g github-oauth.github.com ${{ secrets.ACTIONS_ACCESS_TOKEN }} + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- + + - name: Install dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run test suite + run: ./vendor/bin/phpunit diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c8d2523..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: php - -php: - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - - 7.4 - -before_script: - - curl -sSfL -o ~/.phpenv/versions/hhvm/bin/phpunit https://phar.phpunit.de/phpunit-5.7.26.phar - - composer install --no-interaction --prefer-source - -script: - - vendor/bin/phpunit diff --git a/composer.json b/composer.json index dd29fb4..c7ae9ce 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ }, "require-dev": { "phpunit/phpunit": "^5.0", - "milesj/emojibase": "6.0.0" + "milesj/emojibase": "6.0.*" }, "repositories": [ { From 475cdb8eb48418be37a9936efc55acdeb7c7032b Mon Sep 17 00:00:00 2001 From: bensinclair Date: Fri, 27 Nov 2020 14:50:19 +1000 Subject: [PATCH 2/4] Remove composer access --- .github/workflows/tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 498e827..c97b70c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,9 +28,6 @@ jobs: - name: Validate composer.json and composer.lock run: composer validate - - name: Setup Composer Access - run: composer config -g github-oauth.github.com ${{ secrets.ACTIONS_ACCESS_TOKEN }} - - name: Cache Composer packages id: composer-cache uses: actions/cache@v2 From cbdb367ce0a454f72ef9209f69a8f8eaa9f3a507 Mon Sep 17 00:00:00 2001 From: bensinclair Date: Fri, 27 Nov 2020 14:52:36 +1000 Subject: [PATCH 3/4] Update phpunit.xml --- phpunit.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/phpunit.xml b/phpunit.xml index 28bb8d2..2e8adf6 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,6 +1,5 @@ tests From ab919ea116df4ea605cc36cdfdd4c8de9674320b Mon Sep 17 00:00:00 2001 From: bensinclair Date: Fri, 27 Nov 2020 14:53:51 +1000 Subject: [PATCH 4/4] Remove PHP 5.6 support --- .github/workflows/tests.yml | 2 +- composer.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c97b70c..df3a651 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - php-versions: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' ] + php-versions: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' ] name: PHP ${{ matrix.php-versions }} steps: diff --git a/composer.json b/composer.json index c7ae9ce..d9a219f 100644 --- a/composer.json +++ b/composer.json @@ -5,10 +5,10 @@ "keywords": ["php-emoji", "emoji"], "license": "MIT", "require": { - "php": ">=5.6" + "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "^5.0", + "phpunit/phpunit": "^6.0", "milesj/emojibase": "6.0.*" }, "repositories": [