From 7dd2b0ab8f650d87ea1deee80d37d879f93f332e Mon Sep 17 00:00:00 2001 From: Harish Toshniwal Date: Tue, 14 Jan 2020 22:50:50 +0530 Subject: [PATCH] github actions --- .github/workflows/run-tests.yml | 39 +++++++++++++++++++++++++++++++++ .travis.yml | 17 -------------- CHANGELOG.md | 3 +++ README.md | 2 +- 4 files changed, 43 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/run-tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..428e582 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,39 @@ +name: "Run Tests" + +on: [push] + +jobs: + test: + + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + php: [7.2, 7.3, 7.4] + laravel: [5.8.*, 6.*] + dependency-version: [prefer-lowest, prefer-stable] + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} + + steps: + - name: Checkout code + uses: actions/checkout@v1 + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v1 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick + coverage: none + + - name: Install dependencies + run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest + + - name: Execute tests + run: vendor/bin/phpunit \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a803fe6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: php - -php: - - 7.2 - -before_install: - - travis_retry composer self-update - -install: - - travis_retry composer update --prefer-source - -script: - - phpunit - -branches: - only: - - master \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 293fc1c..d6fe41e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ All the notable changes to the Laravel Natural Language package are documented in this file: +## v3.0.1 (14-01-2020) +- Added Github Actions workflow + ## v3.0.0 (04-09-2019) - Now supports Laravel v6.0 - Support for Laravel v5.8 will be dropped in v3.1 diff --git a/README.md b/README.md index 5431f0a..aa341e0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Laravel package for the Google Natural language API [![Latest Version](https://img.shields.io/github/release/JoggApp/laravel-natural-language.svg?style=flat-rounded)](https://github.com/JoggApp/laravel-natural-language/releases) -[![Build Status](https://travis-ci.org/JoggApp/laravel-natural-language.svg?branch=master)](https://travis-ci.org/JoggApp/laravel-natural-language) +![](https://github.com/JoggApp/laravel-natural-language/workflows/Run%20Tests/badge.svg?branch=master) [![Total Downloads](https://img.shields.io/packagist/dt/JoggApp/laravel-natural-language.svg?style=flat-rounded&colorB=brightgreen)](https://packagist.org/packages/JoggApp/laravel-natural-language) This package makes using the Google Natural API in your laravel app a breeze with minimum to no configuration, clean syntax and a consistent package API. All methods accept a string and return an array: [Docs below.](https://github.com/JoggApp/laravel-natural-language/#how-to-use)