forked from ongr-io/ElasticsearchDSL
-
Notifications
You must be signed in to change notification settings - Fork 16
98 lines (79 loc) · 3.12 KB
/
test-application.yaml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Test application
on:
pull_request:
push:
branches:
- '[0-9]+.[0-9]+'
- '[0-9]+.x'
jobs:
php:
name: 'Run tests with php ${{ matrix.php-version }}, symfony ${{ matrix.symfony-version }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php-version: '8.0'
lint: false
symfony-version: '^2.8'
- php-version: '8.0'
lint: false
symfony-version: '^3.4'
- php-version: '8.0'
lint: false
symfony-version: '^4.4'
- php-version: '8.0'
lint: true
symfony-version: '^4.4'
- php-version: '8.1'
lint: true
symfony-version: '^5.4'
- php-version: '8.1'
lint: true
symfony-version: '^5.4'
- php-version: '8.0'
lint: true
symfony-version: '^6.0'
- php-version: '8.1'
lint: true
symfony-version: '^6.0'
services:
elasticsearch:
image: elasticsearch:8.4.0
ports:
- 9200:9200
env:
discovery.type: 'single-node'
xpack.security.enabled: 'false'
options: --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Install and configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: 'composer'
- name: Get composer cache directory
id: composer-cache-dir
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
id: composer-cache
with:
path: ${{ steps.composer-cache-dir.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer validate --strict
composer require --no-update symfony/serializer:${{ matrix.symfony-version }}
composer install --no-interaction --prefer-dist
- name: Fix code style
if: ${{ matrix.lint }}
run: vendor/bin/phpcs -p --standard=PSR2 --ignore=vendor/ ./
- name: Run tests
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Code Coverage Upload
run: curl -s https://codecov.io/bash