-
Notifications
You must be signed in to change notification settings - Fork 2
74 lines (67 loc) · 2 KB
/
phpunit.yaml
File metadata and controls
74 lines (67 loc) · 2 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
name: PHPUnit
on:
push:
branches: [ main ]
pull_request:
jobs:
unit:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.4', '8.5']
steps:
- uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
- uses: actions/cache@v5
with:
path: vendor
key: composer-${{ matrix.php-version }}-${{ hashFiles('composer.lock', 'composer.json') }}
restore-keys: |
composer-${{ matrix.php-version }}-
composer-
- run: composer install --no-interaction --no-progress
- run: vendor/bin/phpunit --testsuite unit --coverage-clover build/logs/clover.xml
- uses: coverallsapp/github-action@v2
with:
github-token: ${{ github.token }}
integration:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.4', '8.5']
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:9.2.1
env:
discovery.type: single-node
xpack.security.enabled: false
ports:
- 9200:9200
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- uses: actions/cache@v5
with:
path: vendor
key: composer-${{ hashFiles('composer.lock', 'composer.json') }}
restore-keys: |
composer-
- run: composer install --no-interaction --no-progress
- run: ./scripts/import_dataset.php
env:
ELASTICSEARCH_HOST: localhost:9200
- run: vendor/bin/phpunit --testsuite integration
env:
ELASTICSEARCH_HOST: localhost:9200