From a7d01b9ae83290a72cec911fb06d1c6db222e1ee Mon Sep 17 00:00:00 2001 From: Davide Pastore Date: Sat, 30 Jan 2021 20:37:00 +0100 Subject: [PATCH] Move to GitHub Actions (#53) * Use GitHub actions instead of Travis * Remove .travis.yml * Update README.md and README-it.md references to Travis, using GitHub Actions ones instead --- .github/workflows/continuous-integration.yml | 33 ++++++++++++++++++++ .travis.yml | 24 -------------- README-it.md | 6 ++-- README.md | 6 ++-- 4 files changed, 39 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/continuous-integration.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..86f8824 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,33 @@ +name: Continuous Integration + +on: [push, pull_request] + +jobs: + quality: + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: [ubuntu-latest] + php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0'] + name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} + steps: + - uses: actions/checkout@v2 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + + - name: Check PHP Version + run: php -v + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: PHP Unit tests + run: | + vendor/bin/phpunit --testsuite travis-ci + vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover + + - name: Upload code coverage data + run: php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 07f77c1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: php -dist: trusty - -php: - - 7.1 - - 7.2 - - 7.3 - - 7.4 - -matrix: - allow_failures: - - php: hhvm - dist: precise - -before_script: - - composer self-update - - composer install - -script: - - vendor/bin/phpunit --testsuite travis-ci - - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover - -after_script: - - php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover diff --git a/README-it.md b/README-it.md index d57218a..d6c15a3 100644 --- a/README-it.md +++ b/README-it.md @@ -2,7 +2,7 @@ codice-fiscale ====== [![Latest version][ico-version]][link-packagist] -[![Build Status][ico-travis]][link-travis] +[![Build Status][ico-github-actions]][link-github-actions] [![Coverage Status][ico-scrutinizer]][link-scrutinizer] [![Quality Score][ico-code-quality]][link-code-quality] [![Total Downloads][ico-downloads]][link-downloads] @@ -346,14 +346,14 @@ Se hai delle segnalazioni, aprine una [qui](https://github.com/DavidePastore/cod [ico-version]: https://img.shields.io/packagist/v/DavidePastore/codice-fiscale.svg?style=flat-square -[ico-travis]: https://travis-ci.org/DavidePastore/codice-fiscale.svg?branch=master +[ico-github-actions]: https://github.com/DavidePastore/codice-fiscale/workflows/Continuous%20Integration/badge.svg?branch=master [ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/DavidePastore/codice-fiscale.svg?style=flat-square [ico-code-quality]: https://img.shields.io/scrutinizer/g/davidepastore/codice-fiscale.svg?style=flat-square [ico-downloads]: https://img.shields.io/packagist/dt/DavidePastore/codice-fiscale.svg?style=flat-square [ico-styleci]: https://styleci.io/repos/46665960/shield [link-packagist]: https://packagist.org/packages/DavidePastore/codice-fiscale -[link-travis]: https://travis-ci.org/DavidePastore/codice-fiscale +[link-github-actions]: https://github.com/DavidePastore/codice-fiscale/actions?query=workflow%3A%22Continuous+Integration%22 [link-scrutinizer]: https://scrutinizer-ci.com/g/DavidePastore/codice-fiscale/code-structure [link-code-quality]: https://scrutinizer-ci.com/g/DavidePastore/codice-fiscale [link-downloads]: https://packagist.org/packages/DavidePastore/codice-fiscale diff --git a/README.md b/README.md index 140b20d..d35bf16 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ codice-fiscale ====== [![Latest version][ico-version]][link-packagist] -[![Build Status][ico-travis]][link-travis] +[![Build Status][ico-github-actions]][link-github-actions] [![Coverage Status][ico-scrutinizer]][link-scrutinizer] [![Quality Score][ico-code-quality]][link-code-quality] [![Total Downloads][ico-downloads]][link-downloads] @@ -346,14 +346,14 @@ If you have issues, just open one [here](https://github.com/DavidePastore/codice [ico-version]: https://img.shields.io/packagist/v/DavidePastore/codice-fiscale.svg?style=flat-square -[ico-travis]: https://travis-ci.org/DavidePastore/codice-fiscale.svg?branch=master +[ico-github-actions]: https://github.com/DavidePastore/codice-fiscale/workflows/Continuous%20Integration/badge.svg?branch=master [ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/DavidePastore/codice-fiscale.svg?style=flat-square [ico-code-quality]: https://img.shields.io/scrutinizer/g/davidepastore/codice-fiscale.svg?style=flat-square [ico-downloads]: https://img.shields.io/packagist/dt/DavidePastore/codice-fiscale.svg?style=flat-square [ico-styleci]: https://styleci.io/repos/46665960/shield [link-packagist]: https://packagist.org/packages/DavidePastore/codice-fiscale -[link-travis]: https://travis-ci.org/DavidePastore/codice-fiscale +[link-github-actions]: https://github.com/DavidePastore/codice-fiscale/actions?query=workflow%3A%22Continuous+Integration%22 [link-scrutinizer]: https://scrutinizer-ci.com/g/DavidePastore/codice-fiscale/code-structure [link-code-quality]: https://scrutinizer-ci.com/g/DavidePastore/codice-fiscale [link-downloads]: https://packagist.org/packages/DavidePastore/codice-fiscale