diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..573d1ec --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: Pull Request + +on: + push: + branches: [master] +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + extensions: mbstring, intl + - name: PHP Version + run: php -v + - name: Install + run: | + composer self-update + rm -rf composer.lock + composer require cakephp/cakephp:${{matrix.version}} --no-update + composer install --prefer-dist --no-progress + - name: Test Suite + run: | + composer test + - name: Elastic Search Integration Test + env: + elastic_dsn: Cake\ElasticSearch\Datasource\Connection://127.0.0.1:${{ job.services.elasticsearch.ports['9200'] }}?driver=Cake\ElasticSearch\Datasource\Connection + run: | + vendor/bin/phpunit tests/TestCase/Persister/ElasticSearchPersisterIntegrationTest.php diff --git a/README.md b/README.md index af0f83c..f013d51 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # AuditStash Plugin For CakePHP -[![Build Status](https://img.shields.io/travis/lorenzo/audit-stash/master.svg?style=flat-square)](https://travis-ci.org/lorenzo/audit-stash) +[![Build Status](https://github.com/lorenzo/audit-stash/actions/workflows/ci.yml/badge.svg)](https://github.com/lorenzo/audit-stash/actions/workflows/ci.yml) [![Coverage Status](https://img.shields.io/codecov/c/github/lorenzo/audit-stash/master.svg?style=flat-square)](https://codecov.io/github/lorenzo/audit-stash) [![Total Downloads](https://img.shields.io/packagist/dt/lorenzo/audit-stash.svg?style=flat-square)](https://packagist.org/packages/lorenzo/audit-stash) [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE.txt)