From 120ca33e4325cf78471aed7a93192e51d36c9c11 Mon Sep 17 00:00:00 2001 From: Michael Diodone Date: Wed, 6 Jul 2022 16:26:13 +0200 Subject: [PATCH] Migrate master from Travis-CI to GitHub Actions Travis-CI closed its services for open source projects in 2021. --- .github/workflows/tests.yml | 42 +++++++++++++++++++++++++++++++++++++ .travis.yml | 22 ------------------- README.md | 2 +- 3 files changed, 43 insertions(+), 23 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..816830b --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,42 @@ +name: tests + +on: + push: + branches: [ 2.x, master ] + pull_request: + branches: [ 2.x, master ] + +jobs: + tests: + strategy: + matrix: + php-versions: ['7.3', '7.4'] + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + uses: php-actions/composer@v6 + with: + version: 2 + php_version: ${{ matrix.php-versions }} + + - name: Run test suite + run: vendor/bin/phpunit diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 975365c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php - -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - nightly - - hhvm - -matrix: - allow_failures: - - php: nightly - - php: hhvm - -before_script: - - composer install --dev --prefer-source - -script: - - php vendor/bin/phpunit diff --git a/README.md b/README.md index 06813dc..7fa82ac 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Ported from [node-semver 1.1.2](https://github.com/isaacs/node-semver/tree/v1.1.2) to PHP -[![Build Status](https://secure.travis-ci.org/vierbergenlars/php-semver.png?branch=master)](http://travis-ci.org/vierbergenlars/php-semver) +[![Build Status](https://github.com/vierbergenlars/php-semver/actions/workflows/tests.yml/badge.svg)](https://github.com/vierbergenlars/php-semver/actions/workflows/tests.yml) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/vierbergenlars/php-semver/badges/quality-score.png?s=89ff49019cde97e70228ae14d2dc08b727e72157)](https://scrutinizer-ci.com/g/vierbergenlars/php-semver/) [![Latest Stable Version](https://poser.pugx.org/vierbergenlars/php-semver/v/stable.png)](https://packagist.org/packages/vierbergenlars/php-semver) [![Total Downloads](https://poser.pugx.org/vierbergenlars/php-semver/downloads.png)](https://packagist.org/packages/vierbergenlars/php-semver)