Skip to content

Commit 41cd5ae

Browse files
authored
Add GitHub Actions
1 parent f4f9f5b commit 41cd5ae

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/tests.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: tests
2+
3+
on:
4+
# Run action on every push and PR
5+
push:
6+
pull_request:
7+
8+
# Run action at midnight to test against any updated dependencies
9+
schedule:
10+
- cron: "0 0 * * *"
11+
12+
jobs:
13+
tests:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: true
17+
matrix:
18+
os: [ubuntu-latest]
19+
php: [8.0, 7.4, 7.3, 7.2]
20+
laravel: [6.*, 7.*, 8.*]
21+
dependency-version: [prefer-lowest, prefer-stable]
22+
include:
23+
- laravel: 8.*
24+
testbench: 6.*
25+
- laravel: 7.*
26+
testbench: 5.*
27+
- laravel: 6.*
28+
testbench: 4.*
29+
30+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
31+
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v2
35+
36+
- name: Setup PHP
37+
uses: shivammathur/setup-php@v2
38+
with:
39+
php-version: ${{ matrix.php }}
40+
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
41+
coverage: none
42+
43+
- name: Install dependencies
44+
run: |
45+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
46+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
47+
48+
- name: Setup Problem Matches
49+
run: |
50+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
51+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
52+
53+
- name: Execute tests
54+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)