forked from studioespresso/craft-scout
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (49 loc) · 2 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
name: Tests (PHP)
on: [push, pull_request]
jobs:
tests:
name: P${{ matrix.php }} - ${{ matrix.dependency-version }}
strategy:
fail-fast: true
matrix:
php: [8.1, 8.0]
os: [ ubuntu-latest ]
stability: [stable, dev]
dependency-version: [prefer-stable]
runs-on: ${{ matrix.os }}
env:
DB_DATABASE: scout_testing
DB_USER: root
DB_PASSWORD: root
DB_PORT: 3306
DB_DRIVER: mysql
APP_ENV: testing
steps:
- uses: actions/checkout@v2
- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
- name: Setup cache environment
id: cache-env
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php }}
extensions: mbstring,dom,fileinfo,mysql,imagick,bcmath,pcntl,zip,soap,intl,gd,exif,iconv
key: extensions
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring,dom,fileinfo,mysql,imagick,bcmath,pcntl,zip,soap,intl,gd,exif,iconv
coverage: none
- name: Install dependencies
run: |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Run eventHandlersTest
run: ./vendor/bin/codecept run unit EventHandlersTest
- name: Run AbstractEngineTest
run: ./vendor/bin/codecept run unit AbstractEngineTest
- name: Run ScoutVariableTest
run: ./vendor/bin/codecept run unit ScoutVariableTest
- name: Run SearchableBehaviorTest
run: ./vendor/bin/codecept run unit SearchableBehaviorTest