-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (52 loc) · 2.07 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Continuous Integration
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
run-tests:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php: [ 8.0, 8.1 ]
laravel: [ 8.*, 9.* ]
stability: [ prefer-stable ]
include:
- laravel: 8.*
testbench: ^6.23
- laravel: 9.*
testbench: 7.*
name: PHP ${{ matrix.php }} - L${{ matrix.laravel }}
env:
PHP: ${{ matrix.os }}
COMPOSER_MEMORY_LIMIT: -1
PHP_VERSION: ${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-
dependencies-laravel-${{ matrix.laravel }}-php-
dependencies-laravel-
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
extensions: xdebug, zip
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update --dev
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests (Unit and Feature)
run: vendor/bin/phpunit
- name: Static analysis with PHPStan
run: vendor/bin/phpstan analyse
- name: Coding style PSR12 Check
run: vendor/bin/phpcs