Skip to content

Commit ed105cd

Browse files
authored
Update ridge (#21)
* Migrate to PHP 8 Authored-by: Masiukevich Maksim <[email protected]>
1 parent adcced8 commit ed105cd

File tree

88 files changed

+2184
-3028
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2184
-3028
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: "Continuous Integration"
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
psalm:
7+
name: Psalm
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
13+
- name: Install PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: 8.0
17+
coverage: none
18+
tools: composer:v2
19+
20+
- name: Install dependencies with composer
21+
run: composer install -ov
22+
23+
- name: Run vimeo/psalm
24+
run: ./vendor/bin/psalm --config=psalm.xml --shepherd
25+
26+
phpstan:
27+
name: PHPStan
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
33+
- name: Install PHP
34+
uses: shivammathur/setup-php@v2
35+
with:
36+
php-version: 8.0
37+
coverage: none
38+
tools: composer:v2
39+
40+
- name: Install dependencies with composer
41+
run: composer install -ov
42+
43+
- name: Run phpstan/phpstan
44+
run: ./vendor/bin/phpstan analyse src --level 7
45+
46+
phpunit:
47+
name: PHPUnit
48+
49+
runs-on: ubuntu-latest
50+
services:
51+
rabbitmq:
52+
image: rabbitmq:alpine
53+
ports:
54+
- 5672:5672
55+
env:
56+
RABBITMQ_DEFAULT_USER: guest
57+
RABBITMQ_DEFAULT_PASS: guest
58+
options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
59+
60+
env:
61+
PHP_EXTENSIONS: mbstring, dom, intl, json, libxml, xml, xmlwriter, sockets
62+
PHP_INI_VALUES: assert.exception=1, zend.assertions=1
63+
64+
steps:
65+
- name: Checkout
66+
uses: actions/checkout@v2
67+
68+
- name: Install PHP with extensions
69+
uses: shivammathur/setup-php@v2
70+
with:
71+
php-version: 8.0
72+
extensions: ${{ env.PHP_EXTENSIONS }}
73+
ini-values: ${{ env.PHP_INI_VALUES }}
74+
tools: composer:v2
75+
76+
- name: Install dependencies
77+
run: composer update -ov
78+
79+
- name: Await
80+
uses: jakejarvis/wait-action@master
81+
82+
- name: Run tests with phpunit
83+
run: XDEBUG_MODE=coverage php ./vendor/bin/phpunit --configuration ./phpunit.xml --coverage-clover=coverage.clover
84+
85+
- name: Upload coverage file
86+
uses: actions/upload-artifact@v2
87+
with:
88+
name: phpunit.coverage
89+
path: coverage.clover
90+
91+
upload_coverage:
92+
name: Upload coverage
93+
runs-on: ubuntu-latest
94+
needs: phpunit
95+
steps:
96+
- name: Checkout
97+
uses: actions/checkout@v2
98+
99+
- name: Install PHP
100+
uses: shivammathur/setup-php@v2
101+
with:
102+
php-version: 7.4
103+
coverage: none
104+
tools: composer
105+
106+
- name: Download coverage files
107+
uses: actions/download-artifact@v2
108+
with:
109+
path: reports
110+
111+
- name: Send code coverage report to Scrutinizer
112+
run: |
113+
wget https://scrutinizer-ci.com/ocular.phar
114+
php ocular.phar code-coverage:upload --format=php-clover ./reports/phpunit.coverage/coverage.clover

.scrutinizer.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,16 @@ More examples can be found in [`examples`](examples) directory.
5858
## Testing
5959

6060
```bash
61-
$ composer test
62-
```
63-
64-
## Benchmarks
65-
66-
We run benchmarks as follow:
67-
68-
```bash
69-
$ RIDGE_BENCHMARK_DSN=amqp://user:pass@localhost:5672 composer bench
61+
$ composer tests
7062
```
7163

7264
## Change log
7365

74-
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
66+
Please see [CHANGELOG](.github/CHANGELOG.md) for more information on what has changed recently.
7567

7668
## Contributing
7769

78-
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
70+
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CONDUCT](.github/CONDUCT.md) for details.
7971

8072
## Security
8173

benchmarks/AbstractBench.php

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)