From cb3a14e47547a211fba617cc5ad83a96c7ee4b14 Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Tue, 3 Nov 2020 11:29:50 +0100 Subject: [PATCH] Move to GitHub Actions (#247) --- .github/workflows/run-tests.yml | 57 +++++++++++++++++++++++++++++++++ .travis.yml | 57 --------------------------------- README.md | 2 +- 3 files changed, 58 insertions(+), 58 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..5db5b66 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,57 @@ +name: run-tests + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-16.04 + strategy: + fail-fast: true + matrix: + php: [7.4, 7.3, 7.2] + laravel: [8.*, 7.*, 6.*] + dependency-version: [prefer-lowest, prefer-stable] + include: + - laravel: 8.* + testbench: 6.* + - laravel: 7.* + testbench: 5.* + - laravel: 6.* + testbench: 4.* + exclude: + - laravel: 8.* + php: 7.2 + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ~/.composer/cache/files + key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, mysql, mysqli, pdo_mysql + coverage: none + + - name: Install FFmpeg + run: | + sudo apt-get update + sudo add-apt-repository -y ppa:mc3man/xerus-media + sudo apt-get -qq update + sudo apt-get install -y --allow-unauthenticated software-properties-common ffmpeg + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + 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 5bbe4c7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,57 +0,0 @@ -language: php - -cache: - directories: - - $HOME/.composer/cache - -matrix: - include: - - php: 7.2 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.2 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.2 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.2 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.3 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.3 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.3 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.3 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.3 - env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.3 - env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.4 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.4 - env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.4 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.4 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.4 - env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.4 - env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-stable' - fast_finish: true - -before_install: - - sudo apt-get update - - travis_retry composer self-update - - composer config discard-changes true - - travis_retry composer self-update - - travis_retry composer require "laravel/framework:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" --no-interaction --no-update - -install: - - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction --no-suggest - - sudo add-apt-repository -y ppa:mc3man/xerus-media - - sudo apt-get -qq update - - sudo apt-get install -y --allow-unauthenticated software-properties-common ffmpeg - -script: - - vendor/bin/phpunit \ No newline at end of file diff --git a/README.md b/README.md index 86af173..a5b1c8f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Latest Version on Packagist](https://img.shields.io/packagist/v/pbmedia/laravel-ffmpeg.svg?style=flat-square)](https://packagist.org/packages/pbmedia/laravel-ffmpeg) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) -[![Build Status](https://img.shields.io/travis/protonemedia/laravel-ffmpeg/master.svg?style=flat-square)](https://travis-ci.org/protonemedia/laravel-ffmpeg) +![run-tests](https://github.com/protonemedia/laravel-ffmpeg/workflows/run-tests/badge.svg) [![Quality Score](https://img.shields.io/scrutinizer/g/protonemedia/laravel-ffmpeg.svg?style=flat-square)](https://scrutinizer-ci.com/g/protonemedia/laravel-ffmpeg) [![Total Downloads](https://img.shields.io/packagist/dt/pbmedia/laravel-ffmpeg.svg?style=flat-square)](https://packagist.org/packages/pbmedia/laravel-ffmpeg)