diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..6aa8f46 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,45 @@ +name: Test + +on: [push, pull_request] + +jobs: + test: + name: PHP ${{ matrix.php-version }} + + runs-on: ubuntu-18.04 + + strategy: + fail-fast: false + matrix: + php-version: + - 7.1 + - 7.2 + - 7.3 + - 7.4 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: pcov + tools: composer:v2 + + - name: Install Composer dependencies + uses: ramsey/composer-install@v1 + with: + composer-options: --prefer-dist + + - name: Setup PCOV + run: | + composer require pcov/clobber + vendor/bin/pcov clobber + + - name: Run Tests + run: composer tests + + - name: Check coding style + run: composer coding-style diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e6e7677..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: php -php: - - 7.1 - - 7.2 - - 7.3 - - 7.4 - - nightly - -matrix: - allow_failures: - - php: nightly - -before_script: - - composer install - -script: - - vendor/bin/phpcs --standard=vendor/internations/kodierungsregelwerksammlung/ruleset.xml src/ - - vendor/bin/phpunit --exclude-group performance diff --git a/README.md b/README.md index 8dd1bc2..6823eef 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SolrQueryComponent -[![Build Status](https://travis-ci.org/InterNations/SolrQueryComponent.svg)](https://travis-ci.org/InterNations/SolrQueryComponent) +[![Test](https://github.com/InterNations/SolrQueryComponent/actions/workflows/tests.yaml/badge.svg)](https://github.com/InterNations/SolrQueryComponent/actions/workflows/tests.yaml) #### Build Solr queries with ease diff --git a/composer.json b/composer.json index 10228d1..c3653e2 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ }, "require-dev": { "internations/testing-component": "dev-master", - "internations/kodierungsregelwerksammlung": "dev-master", + "internations/kodierungsregelwerksammlung": "^0.35.0", "phpunit/phpunit": "~6" }, "autoload": { @@ -39,5 +39,9 @@ "branch-alias": { "dev-master": "1.0.x-dev" } + }, + "scripts": { + "tests": "phpunit", + "coding-style": "phpcs --standard=vendor/internations/kodierungsregelwerksammlung/ruleset.xml ./src/" } }