Skip to content

Commit cf83eb4

Browse files
committed
Added CI using Github Action
1 parent d99a1b8 commit cf83eb4

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/test.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: PHP test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
name: Test
8+
runs-on: ${{ matrix.os }}
9+
10+
strategy:
11+
matrix:
12+
php-version: [7.1, 7.2, 7.3, 7.4]
13+
os: [ubuntu-latest]
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Use PHP ${{ matrix.php-version }}
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php-version }}
23+
tools: prestissimo
24+
env:
25+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Install dependencies
28+
uses: php-actions/composer@v2
29+
30+
- name: Runs Elasticsearch
31+
uses: elastic/elastic-github-actions/elasticsearch@master
32+
with:
33+
stack-version: 7.x-SNAPSHOT
34+
35+
- name: Unit tests
36+
run: |
37+
vendor/bin/phpunit --configure phpunit.xml.dist
38+
env:
39+
TEST_SUITE: oss
40+
41+
- name: Integration tests
42+
run: |
43+
vendor/bin/phpunit --configure phpunit-integration-tests.xml
44+
env:
45+
TEST_SUITE: oss
46+

0 commit comments

Comments
 (0)