From f1a1f4278e53934b3c1c0bc79a14d6b07042de9b Mon Sep 17 00:00:00 2001 From: Olivier Laviale Date: Tue, 1 Jun 2021 01:30:24 +0200 Subject: [PATCH] Replace Travis with GitHub actions --- .editorconfig | 3 +++ .gitattributes | 4 +++- .github/workflows/test.yml | 48 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 21 ----------------- LICENSE | 2 +- README.md | 2 +- 6 files changed, 56 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.editorconfig b/.editorconfig index 5457090..c4e316e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,3 +14,6 @@ indent_style = space [{*.neon,*.yml}] indent_style = space indent_size = 2 + +[*.md] +indent_style = space diff --git a/.gitattributes b/.gitattributes index 4473f9d..7c4102a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,9 @@ +* text=auto + .editorconfig export-ignore .gitattributes export-ignore +.github export-ignore .gitignore export-ignore -.travis.yml export-ignore Makefile export-ignore phpcs.xml export-ignore phpstan.neon export-ignore diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..c67ef74 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,48 @@ +name: test + +on: +- push +- pull_request + +jobs: + phpunit: + name: phpunit + runs-on: ubuntu-18.04 + strategy: + matrix: + php-version: + - "7.2" + - "7.3" + - "7.4" + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + coverage: xdebug + php-version: "${{ matrix.php-version }}" + ini-values: memory_limit=-1 + tools: composer:v2 + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: | + ~/.composer/cache + vendor + key: "php-${{ matrix.php-version }}" + restore-keys: "php-${{ matrix.php-version }}" + + - name: Install dependencies + run: composer install --no-interaction --no-progress + + - name: Run PHPUnit + run: make test-coveralls + + - name: Upload code coverage + if: ${{ matrix.php-version == '7.2' }} + env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + composer global require php-coveralls/php-coveralls + php-coveralls --coverage_clover=build/logs/clover.xml -v diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 89b3588..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -cache: - directories: - - $COMPOSER_CACHE_DIR - - $HOME/.composer/cache - - build - -language: php - -php: -- 7.2 -- 7.3 -- 7.4 -- nightly - -jobs: - allow_failures: - - php: nightly - -script: -- if [[ $TRAVIS_PHP_VERSION == "7.2" ]]; then make lint; fi -- if [[ $TRAVIS_PHP_VERSION == "7.2" ]]; then make test-coveralls; else make test; fi diff --git a/LICENSE b/LICENSE index 54d226f..264b200 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ The icanboogie/message-bus package is free software. It is released under the terms of the following BSD License. -Copyright (c) 2017-2020 by Olivier Laviale +Copyright (c) 2017-2021 by Olivier Laviale All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/README.md b/README.md index 2ab6bcc..10b309d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # MessageBus [![Packagist](https://img.shields.io/packagist/v/icanboogie/message-bus.svg)](https://packagist.org/packages/icanboogie/message-bus) -[![Build Status](https://img.shields.io/travis/ICanBoogie/MessageBus.svg)](http://travis-ci.org/ICanBoogie/MessageBus) +[![Build Status](https://img.shields.io/github/workflow/status/ICanBoogie/MessageBus/test)](https://github.com/ICanBoogie/MessageBus/actions?query=workflow%3Atest) [![Code Quality](https://img.shields.io/scrutinizer/g/ICanBoogie/MessageBus.svg)](https://scrutinizer-ci.com/g/ICanBoogie/MessageBus) [![Code Coverage](https://img.shields.io/coveralls/ICanBoogie/MessageBus.svg)](https://coveralls.io/r/ICanBoogie/MessageBus) [![Downloads](https://img.shields.io/packagist/dt/icanboogie/message-bus.svg)](https://packagist.org/packages/icanboogie/message-bus/stats)