diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..5d3a185 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,34 @@ +name: Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Validate composer.json and composer.lock + run: composer validate + + - 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 + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run test suite + run: vendor/bin/phpunit tests diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 447a06a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: php -php: - - '8.0' -install: composer install -script: vendor/bin/phpunit --verbose tests diff --git a/README.md b/README.md index dff755a..da26171 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Parable Event -[![Build Status](https://travis-ci.com/parable-php/event.svg?branch=master)](https://travis-ci.com/parable-php/event) +[![Workflow Status](https://github.com/parable-php/event/workflows/Tests/badge.svg)](https://github.com/parable-php/event/actions?query=workflow%3ATests) [![Latest Stable Version](https://poser.pugx.org/parable-php/event/v/stable)](https://packagist.org/packages/parable-php/event) [![Latest Unstable Version](https://poser.pugx.org/parable-php/event/v/unstable)](https://packagist.org/packages/parable-php/event) [![License](https://poser.pugx.org/parable-php/event/license)](https://packagist.org/packages/parable-php/event)