-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (63 loc) · 1.74 KB
/
php-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
name: PHP Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- "8.0"
- "8.1"
- "8.2"
services:
memcached:
image: memcached:alpine
ports:
- 11211:11211
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_USERNAME: root
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
cassandra:
image: cassandra:3.11
ports:
- 9160:9160
- 9042:9042
env:
CASSANDRA_START_RPC: true
options: --health-cmd "cqlsh --debug" --health-interval 10s --health-retries 10
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup MySQL
run: |
sudo apt-get install mysql-client
mysql --host 127.0.0.1 --port 3306 -u root -e "CREATE DATABASE IF NOT EXISTS packaged_dal"
mysql --host 127.0.0.1 --port 3306 -u root packaged_dal < ./.github/mysql-setup.sql
- name: Setup Cassandra
run: |
pip3 install pyOpenSSL --upgrade
pip3 install cqlsh
cqlsh 127.0.0.1 9042 -f ./.github/cassandra-setup.cql
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: apcu, memcached
ini-values: apc.enable_cli=1
coverage: none
- name: Composer install
run: composer install
- name: PHPUnit
run: vendor/bin/phpunit