-
-
Notifications
You must be signed in to change notification settings - Fork 102
75 lines (73 loc) · 2.19 KB
/
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
name: tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
matrix:
php: ['8.2', '8.3']
laravel: ['10.43', '10.48', '11.0', '11.5']
name: PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Installing PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
extensions: mbstring, json, sqlite3
tools: composer:v2
- name: Lock Laravel Version
run: composer require "laravel/framework:${{ matrix.laravel }}.*" --no-update -v
- name: Composer Install
run: composer install --prefer-dist --no-progress --no-interaction
- name: Create SQLite Database
run: mkdir -p database && touch database/database.sqlite
- name: Run Tests [sqlite]
run: php vendor/bin/phpunit --testdox
env:
TEST_DB_ENGINE: sqlite
- name: Run Tests [postgres]
run: php vendor/bin/phpunit --testdox
env:
TEST_DB_ENGINE: pgsql
TEST_DB_PORT: ${{ job.services.postgres.ports[5432] }}
TEST_DB_PASSWORD: postgres
- name: Run Tests [mysql 5.7]
run: php vendor/bin/phpunit --testdox
env:
TEST_DB_ENGINE: mysql
TEST_DB_PORT: ${{ job.services.mysql.ports[3306] }}
- name: Run Tests [mysql 8.0]
run: php vendor/bin/phpunit --testdox
env:
TEST_DB_ENGINE: mysql
TEST_DB_PORT: ${{ job.services.mysql8.ports[3306] }}
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: vanilo_test
ports:
- 3306
mysql8:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: vanilo_test
ports:
- 3306
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: vanilo_test
ports:
- 5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5