-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (43 loc) · 1.24 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
name: Run tests
on:
push:
branches:
- master
- '*.x'
pull_request:
jobs:
test:
runs-on: ubuntu-latest
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }}
strategy:
fail-fast: true
matrix:
php: [8.1, 8.2, 8.3]
laravel: [10.*, 11.*]
dependency-version: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
exclude:
- laravel: 11.*
php: 8.1
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2, phpunit
- name: Install dependencies
run: |
composer require "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --no-interaction --no-progress
- name: Execute tests
run: vendor/bin/phpunit
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}