Skip to content

Commit

Permalink
Update ridge (#21)
Browse files Browse the repository at this point in the history
* Migrate to PHP 8

Authored-by: Masiukevich Maksim <[email protected]>
  • Loading branch information
mmasiukevich authored Jan 3, 2021
1 parent adcced8 commit ed105cd
Show file tree
Hide file tree
Showing 88 changed files with 2,184 additions and 3,028 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
114 changes: 114 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: "Continuous Integration"

on: [ push, pull_request ]

jobs:
psalm:
name: Psalm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none
tools: composer:v2

- name: Install dependencies with composer
run: composer install -ov

- name: Run vimeo/psalm
run: ./vendor/bin/psalm --config=psalm.xml --shepherd

phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none
tools: composer:v2

- name: Install dependencies with composer
run: composer install -ov

- name: Run phpstan/phpstan
run: ./vendor/bin/phpstan analyse src --level 7

phpunit:
name: PHPUnit

runs-on: ubuntu-latest
services:
rabbitmq:
image: rabbitmq:alpine
ports:
- 5672:5672
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5

env:
PHP_EXTENSIONS: mbstring, dom, intl, json, libxml, xml, xmlwriter, sockets
PHP_INI_VALUES: assert.exception=1, zend.assertions=1

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_VALUES }}
tools: composer:v2

- name: Install dependencies
run: composer update -ov

- name: Await
uses: jakejarvis/wait-action@master

- name: Run tests with phpunit
run: XDEBUG_MODE=coverage php ./vendor/bin/phpunit --configuration ./phpunit.xml --coverage-clover=coverage.clover

- name: Upload coverage file
uses: actions/upload-artifact@v2
with:
name: phpunit.coverage
path: coverage.clover

upload_coverage:
name: Upload coverage
runs-on: ubuntu-latest
needs: phpunit
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
tools: composer

- name: Download coverage files
uses: actions/download-artifact@v2
with:
path: reports

- name: Send code coverage report to Scrutinizer
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover ./reports/phpunit.coverage/coverage.clover
66 changes: 0 additions & 66 deletions .scrutinizer.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,16 @@ More examples can be found in [`examples`](examples) directory.
## Testing

```bash
$ composer test
```

## Benchmarks

We run benchmarks as follow:

```bash
$ RIDGE_BENCHMARK_DSN=amqp://user:pass@localhost:5672 composer bench
$ composer tests
```

## Change log

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
Please see [CHANGELOG](.github/CHANGELOG.md) for more information on what has changed recently.

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CONDUCT](.github/CONDUCT.md) for details.

## Security

Expand Down
80 changes: 0 additions & 80 deletions benchmarks/AbstractBench.php

This file was deleted.

52 changes: 0 additions & 52 deletions benchmarks/ConsumeBench.php

This file was deleted.

Loading

0 comments on commit ed105cd

Please sign in to comment.