Skip to content

Commit dad4a0d

Browse files
committed
GitHub Actions CI.
1 parent 6820d01 commit dad4a0d

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/run_tests.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Tests
2+
3+
on: ['push', 'pull_request']
4+
5+
jobs:
6+
ci:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
php: [7.2, 7.3, 7.4, 8.0]
12+
laravel: [6.*]
13+
dependency-version: [prefer-stable, prefer-lowest]
14+
include:
15+
- laravel: 6.*
16+
testbench: 4.*
17+
18+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - Testbench ${{ matrix.testbench }} (${{ matrix.dependency-version }})
19+
20+
steps:
21+
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
25+
- name: Cache dependencies
26+
uses: actions/cache@v1
27+
with:
28+
path: ~/.composer/cache/files
29+
key: dependencies-php-${{ matrix.php }}-composer-${{ matrix.laravel }}-${{ matrix.testbench }}-${{ matrix.dependency-version }}
30+
31+
- name: Setup PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: ${{ matrix.php }}
35+
extensions: mbstring, zip
36+
tools: prestissimo
37+
coverage: pcov
38+
39+
- name: Install Composer dependencies
40+
run: |
41+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
42+
composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist --no-suggest
43+
44+
- name: PHPUnit Testing
45+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)