Skip to content

Commit 7244e42

Browse files
authored
Workfow updated (#10)
1 parent 1fbd45b commit 7244e42

File tree

5 files changed

+22
-28
lines changed

5 files changed

+22
-28
lines changed
Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build
1+
name: tests
22

33
on:
44
push:
@@ -7,6 +7,8 @@ on:
77
tags-ignore:
88
- '**'
99
pull_request:
10+
schedule:
11+
- cron: '0 0 * * 0' # once in a week, docs: <https://git.io/JvxXE#onschedule>
1012

1113
jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-actions>
1214
tests:
@@ -28,11 +30,9 @@ jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-ac
2830
steps:
2931
- name: Check out code
3032
uses: actions/checkout@v2
31-
with:
32-
fetch-depth: 1
3333

3434
- name: Setup PHP, with composer and extensions
35-
uses: shivammathur/setup-php@master # Action page: <https://github.com/shivammathur/setup-php>
35+
uses: shivammathur/setup-php@v2 # Action page: <https://github.com/shivammathur/setup-php>
3636
with:
3737
php-version: ${{ matrix.php }}
3838
extensions: mbstring, pdo, pdo_sqlite, sqlite3 # definition is required for php 7.4
@@ -42,22 +42,22 @@ jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-ac
4242
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
4343

4444
- name: Cache dependencies # Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer>
45-
uses: actions/cache@v1
45+
uses: actions/cache@v2
4646
with:
4747
path: ${{ steps.composer-cache.outputs.dir }}
48-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
48+
key: ${{ runner.os }}-composer-${{ matrix.setup }}-${{ hashFiles('**/composer.json') }}
4949
restore-keys: ${{ runner.os }}-composer-
5050

5151
- name: Install Composer 'hirak/prestissimo' package
52-
run: composer global require hirak/prestissimo --update-no-dev
52+
run: composer global require hirak/prestissimo --update-no-dev --no-progress --ansi
5353

5454
- name: Install lowest Composer dependencies
5555
if: matrix.setup == 'lowest'
56-
run: composer update --prefer-dist --no-interaction --no-suggest --prefer-lowest
56+
run: composer update --prefer-dist --no-interaction --no-suggest --prefer-lowest --ansi
5757

5858
- name: Install basic Composer dependencies
5959
if: matrix.setup == 'basic'
60-
run: composer update --prefer-dist --no-interaction --no-suggest
60+
run: composer update --prefer-dist --no-interaction --no-suggest --ansi
6161

6262
- name: Show most important packages versions
6363
run: composer info | grep -e laravel -e spiral -e phpunit/phpunit -e phpstan/phpstan
@@ -83,11 +83,9 @@ jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-ac
8383
steps:
8484
- name: Check out code
8585
uses: actions/checkout@v2
86-
with:
87-
fetch-depth: 1
8886

8987
- name: Setup PHP, with composer and extensions
90-
uses: shivammathur/setup-php@master
88+
uses: shivammathur/setup-php@v2
9189
with:
9290
php-version: 7.4
9391
extensions: mbstring
@@ -97,17 +95,17 @@ jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-ac
9795
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
9896

9997
- name: Cache dependencies
100-
uses: actions/cache@v1
98+
uses: actions/cache@v2
10199
with:
102100
path: ${{ steps.composer-cache.outputs.dir }}
103101
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
104102
restore-keys: ${{ runner.os }}-composer-
105103

106104
- name: Install Composer 'hirak/prestissimo' package
107-
run: composer global require hirak/prestissimo --update-no-dev
105+
run: composer global require hirak/prestissimo --update-no-dev --ansi
108106

109107
- name: Install Composer dependencies
110-
run: composer update --prefer-dist --no-interaction --no-suggest
108+
run: composer update --prefer-dist --no-interaction --no-suggest --ansi
111109

112110
- name: Execute check
113111
run: composer cs-check

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ composer.lock
44
# IDEs
55
/nbproject
66
/.idea
7-
/.vscode.vscode
7+
/.vscode
88

99
# Vendors
1010
/vendor

Dockerfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
FROM composer:1.8.6 AS composer
2-
31
FROM php:7.2.5-alpine
42

53
ENV \
64
COMPOSER_ALLOW_SUPERUSER="1" \
75
COMPOSER_HOME="/tmp/composer"
86

9-
COPY --from=composer /usr/bin/composer /usr/bin/composer
7+
COPY --from=composer:1.10.7 /usr/bin/composer /usr/bin/composer
108

11-
RUN set -xe \
12-
&& apk add --no-cache binutils git curl \
13-
&& apk add --no-cache --virtual .build-deps autoconf pkgconf make g++ gcc \
9+
RUN set -x \
10+
&& apk add --no-cache binutils git \
11+
&& apk add --no-cache --virtual .build-deps autoconf pkgconf make g++ gcc 1>/dev/null \
1412
# install xdebug (for testing with code coverage), but do not enable it
15-
&& pecl install xdebug-2.9.1 \
13+
&& pecl install xdebug-2.9.1 1>/dev/null \
1614
&& apk del .build-deps \
1715
&& mkdir /src ${COMPOSER_HOME} \
1816
&& composer global require 'hirak/prestissimo' --no-interaction --no-suggest --prefer-dist \
@@ -23,5 +21,3 @@ RUN set -xe \
2321
&& php -m
2422

2523
WORKDIR /src
26-
27-
VOLUME ["/src"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Easy way for connecting [RoadRunner][roadrunner] and [Laravel][laravel] applicat
2020
Require this package with composer using next command:
2121

2222
```shell script
23-
$ composer require spiral/roadrunner-laravel "^3.3"
23+
$ composer require spiral/roadrunner-laravel "^3.4"
2424
```
2525

2626
> Installed `composer` is required ([how to install composer][getcomposer]).
@@ -271,7 +271,7 @@ MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maint
271271

272272
[badge_packagist_version]:https://img.shields.io/packagist/v/spiral/roadrunner-laravel.svg?maxAge=180
273273
[badge_php_version]:https://img.shields.io/packagist/php-v/spiral/roadrunner-laravel.svg?longCache=true
274-
[badge_build_status]:https://img.shields.io/github/workflow/status/spiral/roadrunner-laravel/build?maxAge=60
274+
[badge_build_status]:https://img.shields.io/github/workflow/status/spiral/roadrunner-laravel/tests?maxAge=30
275275
[badge_coverage]:https://img.shields.io/codecov/c/github/spiral/roadrunner-laravel/master.svg?maxAge=180
276276
[badge_downloads_count]:https://img.shields.io/packagist/dt/spiral/roadrunner-laravel.svg?maxAge=180
277277
[badge_license]:https://img.shields.io/packagist/l/spiral/roadrunner-laravel.svg?maxAge=256

src/Worker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ protected function bootstrapApplication(ApplicationContract $app, PSR7Client $ps
183183

184184
// Insert `SetRequestForConsole` bootstrapper before `RegisterProviders` if it does not exists
185185
if (!\in_array(SetRequestForConsole::class, $bootstrappers, true)) {
186-
$register_index = \array_search(RegisterProviders::class, $bootstrappers, true);
186+
$register_index = (int) \array_search(RegisterProviders::class, $bootstrappers, true);
187187

188188
if ($register_index !== false) {
189189
\array_splice($bootstrappers, $register_index, 0, [SetRequestForConsole::class]);

0 commit comments

Comments
 (0)