-
Notifications
You must be signed in to change notification settings - Fork 11
84 lines (70 loc) · 1.78 KB
/
php.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
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
services:
mongo:
image: mongo:latest
env:
MONGO_INITDB_ROOT_USERNAME: testing
MONGO_INITDB_ROOT_PASSWORD: password
MONGO_INITDB_DATABASE: testing
ports:
- 27017:27017
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
env:
ACCEPT_EULA: Y
MSSQL_PID: Express
MSSQL_SA_PASSWORD: P@ssword
ports:
- 1433:1433
mysql:
image: mysql
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_USER: testing
MYSQL_PASSWORD: password
MYSQL_DATABASE: testing
ports:
- 3306:3306
postgres:
image: postgres
env:
POSTGRES_USER: testing
POSTGRES_PASSWORD: password
POSTGRES_DB: testing
ports:
- 5432:5432
redis:
image: redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 10
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Create databases
run: |
/opt/mssql-tools/bin/sqlcmd -U "sa" -P "P@ssword" -Q "CREATE DATABASE testing;"
- name: Run test suite
run: composer test
env:
DB_HOST: 127.0.0.1