-
Notifications
You must be signed in to change notification settings - Fork 18
52 lines (45 loc) · 1.29 KB
/
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
name: test
on:
push:
branches: [main, develop, fix-test-action]
pull_request:
branches: [main, develop]
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
php: ["8.2"]
steps:
- uses: actions/checkout@v3
- name: Create config files
run: |
cp ./config/app_local.example.php ./config/app_local.php
cp ./config/config.example.json ./config/config.json
- name: Setup MariaDB
uses: getong/[email protected]
with:
host port: 3306
container port: 3306
mysql database: "cerebrate_test"
mysql user: "cerebrate"
mysql password: "cerebrate"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pdo, pdo_mysql, mysqli, simplexml
- name: Install dependencies
env:
php_version: ${{ matrix.php }}
run: |
sudo apt-get -y update
sudo apt-get install -y --no-install-recommends curl git zip unzip libicu-dev libxml2-dev
composer install --no-progress --no-interaction
- name: Run tests
run: composer test
env:
DEBUG: true