-
-
Notifications
You must be signed in to change notification settings - Fork 54
57 lines (44 loc) · 1.64 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
name: Tests (PHP)
on: [push, pull_request]
jobs:
tests:
name: P${{ matrix.php }} - ${{ matrix.dependency-version }}
strategy:
fail-fast: true
matrix:
php: [8.2]
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
DB_SERVER: 127.0.0.1
APP_ENV: testing
steps:
- uses: actions/checkout@v4
- 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
- name: Run all tests
run: ./vendor/bin/codecept run