-
-
Notifications
You must be signed in to change notification settings - Fork 12
142 lines (114 loc) · 4.86 KB
/
tests.yml
File metadata and controls
142 lines (114 loc) · 4.86 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Tests
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
tests:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0.30
env:
MYSQL_ROOT_PASSWORD: "root_password"
MYSQL_DATABASE: "outbox_messages"
MYSQL_USER: "username"
MYSQL_PASSWORD: "password"
MYSQL_ROOT_HOST: "0.0.0.0"
ports:
- "3306:3306"
postgres:
image: postgres:14-alpine3.16
env:
POSTGRES_DB: "outbox_messages"
POSTGRES_USER: "username"
POSTGRES_PASSWORD: "password"
ports:
- "5432:5432"
strategy:
fail-fast: true
matrix:
php: [8.0, 8.1, 8.2, 8.3, 8.4, 8.5]
eventsauce: ['^3.0']
stability: [prefer-lowest, prefer-stable]
name: PHP ${{ matrix.php }} - EventSauce ${{ matrix.eventsauce }} - ${{ matrix.stability }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip
coverage: none
- name: Install specific eventsauce version
run: |
composer require "eventsauce/eventsauce=${{ matrix.eventsauce }}" -w --prefer-dist --no-interaction --no-update
- name: Install doctrine 3
run: |
composer require "doctrine/dbal:^3.1" -w --prefer-dist --no-interaction --no-update
- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
- name: Setup database
run: php src/wait-for-and-setup-database.php
- name: Execute tests
run: vendor/bin/phpunit --exclude-group=doctrine2
- name: Install doctrine 4
if: ${{ matrix.php >= 8.1 }}
run: |
composer require "doctrine/dbal:^4.0" -w --prefer-dist --no-interaction --no-update
- name: Install dependencies
if: ${{ matrix.php >= 8.1 }}
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
- name: Execute tests
if: ${{ matrix.php >= 8.1 }}
run: vendor/bin/phpunit --exclude-group=doctrine2
- name: Run PHPStan
if: ${{ matrix.eventsauce == '3.0' }}
run: vendor/bin/phpstan analyze
- name: Install doctrine2
run: composer require doctrine/dbal:^2.12 carbonphp/carbon-doctrine-types:* --${{ matrix.stability }} -w --prefer-dist --no-interaction --no-progress
- name: Execute doctrine2 tests
run: vendor/bin/phpunit --group=doctrine2
- name: Install illuminate/database 9
run: composer require illuminate/database:^9.0 --${{ matrix.stability }} -w --prefer-dist --no-interaction --no-progress
- name: Execute illuminate tests
run: vendor/bin/phpunit --group=illuminate
- name: Install illuminate/database 10
if: ${{ matrix.php >= 8.1 }}
run: |
composer require illuminate/database:^10.0 --${{ matrix.stability }} -w --prefer-dist --no-interaction --no-progress --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
- name: Execute illuminate tests
if: ${{ matrix.php >= 8.1 }}
run: vendor/bin/phpunit --group=illuminate
- name: Install illuminate/database 11
if: ${{ matrix.php >= 8.2 }}
run: |
composer require illuminate/database:^11.0 --${{ matrix.stability }} -w --prefer-dist --no-interaction --no-progress --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
- name: Execute illuminate tests
if: ${{ matrix.php >= 8.2 }}
run: vendor/bin/phpunit --group=illuminate
- name: Install illuminate/database 12
if: ${{ matrix.php >= 8.2 }}
run: |
composer require illuminate/database:^12.0 --${{ matrix.stability }} -w --prefer-dist --no-interaction --no-progress --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
- name: Execute illuminate tests
if: ${{ matrix.php >= 8.2 }}
run: vendor/bin/phpunit --group=illuminate
- name: Install illuminate/database 13
if: ${{ matrix.php >= 8.3 }}
run: |
composer require illuminate/database:^13.0 --${{ matrix.stability }} -w --prefer-dist --no-interaction --no-progress --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
- name: Execute illuminate tests
if: ${{ matrix.php >= 8.3 }}
run: vendor/bin/phpunit --group=illuminate
- name: Run PHPStan
if: ${{ matrix.eventsauce == '3.0' }}
run: vendor/bin/phpstan analyze -c phpstan.doctrine2.neon