-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (46 loc) · 1.99 KB
/
run-tests.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
name: run-tests
on: push
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [7.4]
laravel: [7.*, 6.*]
dependency-version: [prefer-lowest, prefer-stable]
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
composer-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-
composer-laravel-${{ matrix.laravel }}-php-
composer-laravel-
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: phpunit
run: vendor/bin/phpunit
- name: php-cs-test
run: vendor/bin/php-cs-test
- name: php-md-test
run: vendor/bin/php-md-test ./src
- name: php-tlint-test
run: vendor/bin/php-tlint-test ./src
- name: php-insights-test
run: vendor/bin/php-insights-test
- name: php-stan-test
run: vendor/bin/php-stan-test
- name: php-mn-test
run: vendor/bin/php-mn-test ./src