-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (43 loc) · 1.15 KB
/
build_laravel.yaml
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
name: Build on specific PHP & Laravel versions
on:
pull_request:
branches:
- 'main'
types: [ opened, synchronize, reopened, ready_for_review ]
push:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.2, 8.3]
laravel: [ '^11' ]
steps:
- uses: actions/checkout@v3
if: success()
- name: Setup PHP with coverage driver
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
- name: Setup
if: success()
run: |
php -v
touch coverage.xml
mv .env.mysql .env
sudo service mysql start
mysql -uroot -proot -e "CREATE DATABASE eloquentdocs;"
- name: PHPUnit tests
if: success()
run: |
composer test