-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
111 lines (104 loc) · 4.05 KB
/
run-integration-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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Integration Tests
on:
push:
branches:
- master
pull_request:
branches:
- "*"
schedule:
- cron: '0 0 * * *'
jobs:
php-lumen-integration-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
COMPOSER_NO_INTERACTION: 1
strategy:
matrix:
php: [8.4, 8.3, 8.2, 8.1, 8.0]
lumen: [10.*, 9.*]
exclude:
- lumen: 10.*
php: 8.0
name: P${{ matrix.php }} - Lumen${{ matrix.lumen }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
path: src
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer:v2
- name: Install dependencies
run: |
composer create-project --prefer-dist laravel/lumen:${{ matrix.lumen }} --stability=dev --no-progress sample
cd sample
composer config minimum-stability dev
composer update --prefer-stable --prefer-dist --no-progress
- name: Add package from source
run: |
cd sample
sed -e 's|"type": "project",|&\n"repositories": [ { "type": "path", "url": "../src" } ],|' -i composer.json
composer require --dev "barryvdh/laravel-debugbar:*"
- name: Insert service provider
run: sed -e 's|// \$app->register(App\\\Providers\\\EventServiceProvider::class);|&\n$app->register(\\Barryvdh\\Debugbar\\LumenServiceProvider::class);|' -i sample/bootstrap/app.php
- name: Execute clear run
run: |
cd sample
mkdir -p "storage/debugbar/" && touch "storage/debugbar/foo.json"
php artisan debugbar:clear
- name: Check file count in logs
run: |
if [ `ls -1q "sample/storage/debugbar/" | wc -l` -gt 0 ];then exit 1;fi
php-laravel-integration-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
COMPOSER_NO_INTERACTION: 1
strategy:
fail-fast: false
matrix:
php: [8.4, 8.3, 8.2, 8.1, 8.0]
laravel: [11.*, 10.*, 9.*]
exclude:
- laravel: 10.*
php: 8.0
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 8.1
name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
path: src
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer:v2
- name: Install dependencies
run: |
composer create-project --prefer-dist laravel/laravel:${{ matrix.laravel }} --stability=dev --no-progress sample
cd sample
composer config minimum-stability dev
composer update --prefer-stable --prefer-dist --no-progress
- name: Add package from source
run: |
cd sample
sed -e 's|"type": "project",|&\n"repositories": [ { "type": "path", "url": "../src" } ],|' -i composer.json
composer require --dev "barryvdh/laravel-debugbar:*"
- name: Execute generate run
run: |
cd sample
mkdir -p "storage/debugbar/" && touch "storage/debugbar/foo.json"
php artisan debugbar:clear
- name: Check file count in logs
run: |
if [ `ls -1q "sample/storage/debugbar/" | wc -l` -gt 0 ];then exit 1;fi