-
Notifications
You must be signed in to change notification settings - Fork 71
81 lines (68 loc) · 2.12 KB
/
test.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Tests
on:
workflow_dispatch:
push:
paths:
- '**.php'
- '**.stubphp'
- '**.feature'
- '**.yml'
- 'composer.json'
- '.github/workflows/test.yml'
pull_request:
paths:
- '**.php'
- '**.stubphp'
- '**.feature'
- 'composer.json'
schedule:
- cron: "0 6 * * *"
jobs:
unit_tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none
tools: composer:v2
- name: Check Composer configuration
run: composer validate --strict
- name: Install composer dependencies
run: composer install
- name: Run Unit tests
run: composer test:unit
acceptance_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.3, 8.2, 8.0]
laravel: [^10.0, ^9.0]
dependencies: [lowest, highest]
exclude:
- php: 8.0
laravel: ^10.0
name: Acceptance P${{ matrix.php }} | L${{ matrix.laravel }} | ${{ matrix.dependencies == 'highest' && '↑' || '↓' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=256M
coverage: none
tools: composer
- name: Install lowest dependencies from composer.json
if: "matrix.dependencies == 'lowest'"
run: composer update --with='laravel/framework:${{ matrix.laravel }}' --no-interaction --no-progress --prefer-dist --prefer-stable --prefer-lowest
- name: Install highest dependencies from composer.json
if: "matrix.dependencies == 'highest'"
run: composer update --with='laravel/framework:${{ matrix.laravel }}' --no-interaction --no-progress --prefer-dist --prefer-stable
- name: Run Acceptance Tests
run: composer test:type