-
Notifications
You must be signed in to change notification settings - Fork 14
53 lines (44 loc) · 1.57 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
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
php: [ 8.2, 8.3 ]
laravel: [ "^10.0", "^11.0" ]
stability: [ prefer-lowest, prefer-stable ]
include:
- laravel: "^10.0"
testbench: "^8.0"
- laravel: "^11.0"
testbench: "^9.0"
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
steps:
- name: 📚 Checkout code
uses: actions/checkout@v3
- name: 🔥 Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: bcmath, curl, dom, fileinfo, intl, libxml, mbstring, pcntl, pdo, sqlite, zip
coverage: none
- name: 🔎 Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: 📦 Install Composer dependencies
run: |
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_PASSWORD }}"
composer require "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-ansi --no-scripts --no-progress
- name: 🧪 Run test suite
run: ./vendor/bin/phpunit