Skip to content

Commit d4292eb

Browse files
committed
Added Github Actions
1 parent b636c6e commit d4292eb

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

.github/workflows/run-tests.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Run tests
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: '0 0 * * *'
7+
8+
jobs:
9+
php-tests:
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
matrix:
14+
php: [7.4, 7.3, 7.2]
15+
laravel: [7.*, 6.*, 5.8.*, 5.7.*, 5.6.*]
16+
os: [ubuntu-latest]
17+
include:
18+
- laravel: 7.*
19+
testbench: 5.*
20+
- laravel: 6.*
21+
testbench: 4.*
22+
- laravel: 5.8.*
23+
testbench: 3.8.*
24+
- laravel: 5.7.*
25+
testbench: 3.7.*
26+
- laravel: 5.6.*
27+
testbench: 3.6.*
28+
exclude:
29+
- laravel: 5.7.*
30+
php: 7.4
31+
- laravel: 5.6.*
32+
php: 7.4
33+
- laravel: 5.5.*
34+
php: 7.4
35+
36+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
37+
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v1
41+
42+
- name: Setup PHP
43+
uses: shivammathur/setup-php@v1
44+
with:
45+
php-version: ${{ matrix.php }}
46+
extensions: mbstring, dom, fileinfo
47+
coverage: none
48+
49+
- name: Install dependencies
50+
run: |
51+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
52+
composer update --prefer-stable --prefer-dist --no-interaction --no-suggest
53+
- name: Execute tests
54+
run: vendor/bin/phpunit

src/TaskHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private function captureTask()
8585
throw new CloudTasksException('Could not read incoming task');
8686
}
8787

88-
$task = json_decode($input, true, JSON_THROW_ON_ERROR);
88+
$task = json_decode($input, true);
8989

9090
if (is_null($task)) {
9191
throw new CloudTasksException('Could not decode incoming task');

0 commit comments

Comments
 (0)