Skip to content

Commit dd84f6f

Browse files
committed
setup testing matrix
1 parent 5931650 commit dd84f6f

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

.github/workflows/phpstan.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: PHPStan
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- 'phpstan.neon.dist'
8+
pull_request:
9+
paths:
10+
- '**.php'
11+
- 'phpstan.neon.dist'
12+
13+
14+
jobs:
15+
phpstan:
16+
name: phpstan
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Setup PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: '8.0'
25+
coverage: none
26+
27+
- name: Install composer dependencies
28+
uses: ramsey/composer-install@v1
29+
30+
- name: Run PHPStan
31+
run: ./vendor/bin/phpstan --error-format=github

.github/workflows/run-tests-l8.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Run Tests - Current"
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
php: [8.1, 8.0, 7.4]
13+
laravel: [9.*, 8.*]
14+
dependency-version: [prefer-lowest, prefer-stable]
15+
include:
16+
- laravel: 9.*
17+
testbench: 7.*
18+
- laravel: 8.*
19+
testbench: 6.*
20+
21+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v2
26+
27+
- name: Cache dependencies
28+
uses: actions/cache@v2
29+
with:
30+
path: ~/.composer/cache/files
31+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
32+
33+
- name: Setup PHP
34+
uses: shivammathur/setup-php@v2
35+
with:
36+
php-version: ${{ matrix.php }}
37+
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
38+
coverage: none
39+
40+
- name: Install dependencies
41+
run: |
42+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update
43+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
44+
cp .env.example .env
45+
- name: Execute tests
46+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)