-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (44 loc) · 1.27 KB
/
php-unit-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
name: tine20 php unit test CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
defaults:
run:
shell: pwsh
jobs:
test:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-20.04]
php-versions: ['7.4', '8.0']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Run mysql
run: |
sudo systemctl start mysql.service
mysql -uroot -proot --host 127.0.0.1 -e 'CREATE DATABASE IF NOT EXISTS tine20;'
mysql -uroot -proot --host 127.0.0.1 -e "ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY 'root';"
- name: Install tine20
run: |
cd tine20
composer install --ignore-platform-reqs
cp config.inc.github.php config.inc.php
cp install.properties.github install.properties
vendor/bin/phing tine-install
- name: Unit tests
run: |
cd tests/tine20
../../tine20/vendor/bin/phpunit --color GithubTests.php