-
Notifications
You must be signed in to change notification settings - Fork 203
48 lines (39 loc) · 1.04 KB
/
phpunit.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
name: PHPUnit
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
services:
elasticsearch:
image: elastic/elasticsearch:6.8.14
ports:
- 9200:9200
env:
discovery.type: single-node
strategy:
matrix:
php: ['7.0', '7.1', '7.2', '7.3', '7.4']
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Wait for Elasticsearch
run: php ./.github/wait_for_es.php
- name: Run PHPUnit
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Run PHPCS
run: vendor/bin/phpcs -p --standard=PSR2 --ignore=vendor/ ./
- name: Upload Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml