-
Notifications
You must be signed in to change notification settings - Fork 11
55 lines (43 loc) · 1.47 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
name: Tests
on: [ push, pull_request ]
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '8.1', '8.2' ]
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, pdo, pdo_mysql, intl, zip, xml, json, pdo_sqlite, openssl
coverage: none
- name: Setup MySQL
uses: mirromutth/[email protected]
with:
host port: 3306
container port: 3306
character set server: 'utf8mb4'
collation server: 'utf8mb4_general_ci'
mysql version: '5.7'
mysql database: 'test'
mysql root password: 'secret'
- name: Install dependencies for PHP
run: composer update --prefer-dist --no-progress
- name: Install twig/twig
run: composer require twig/twig
- name: .env.json file setup
run: php -r 'file_exists(".env.json") || copy(".env.example.json", ".env.json");'
- name: Generate the key
run: php bow generate:key
- name: Run the Bow development server
run: php bow run:server --port=5000 &
- name: Sleep 5 seconds
run: sleep 5
- name: Run test suite
run: vendor/bin/phpunit