Skip to content

Commit 8c6b00b

Browse files
committed
Removed Travis CI in favor of Github Action
1 parent 5a22a88 commit 8c6b00b

File tree

6 files changed

+86
-125
lines changed

6 files changed

+86
-125
lines changed

.github/workflows/test.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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.3, 7.4, 8.0]
13+
os: [ubuntu-latest]
14+
es-version: [7.x-SNAPSHOT]
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Use PHP ${{ matrix.php-version }}
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php-version }}
24+
extensions: yaml
25+
env:
26+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Get composer cache directory
29+
id: composercache
30+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
31+
32+
- name: Cache dependencies
33+
uses: actions/cache@v2
34+
with:
35+
path: ${{ steps.composercache.outputs.dir }}
36+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
37+
restore-keys: ${{ runner.os }}-composer-
38+
39+
- name: Install dependencies
40+
if: ${{ matrix.php-version != '8.0' }}
41+
run: |
42+
composer install --prefer-dist
43+
44+
- name: ignore ignore-platform-reqs if it is using php 8
45+
if: ${{ matrix.php-version == '8.0' }}
46+
run: |
47+
composer install --prefer-dist --ignore-platform-reqs
48+
49+
- name: PHP Coding Standards
50+
run: |
51+
composer run-script phpcs
52+
53+
- name: PHP Static Analysis Tool
54+
run: |
55+
composer run-script phpstan
56+
57+
- name: Unit tests
58+
run: |
59+
vendor/bin/phpunit -c phpunit.xml.dist
60+
env:
61+
TEST_SUITE: oss
62+
63+
- name: Configure sysctl limits
64+
run: |
65+
sudo swapoff -a
66+
sudo sysctl -w vm.swappiness=1
67+
sudo sysctl -w fs.file-max=262144
68+
sudo sysctl -w vm.max_map_count=262144
69+
70+
- name: Runs Elasticsearch ${{ matrix.es-version }}
71+
uses: elastic/elastic-github-actions/elasticsearch@master
72+
with:
73+
stack-version: ${{ matrix.es-version }}
74+
75+
- name: Integration tests
76+
run: |
77+
vendor/bin/phpunit -c phpunit-integration-tests.xml
78+
env:
79+
TEST_SUITE: oss

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,10 @@ util/backup_*
3131

3232
# PHPUnit
3333
/phpunit.xml
34-
.phpunit.result.cache
34+
.phpunit.result.cache
35+
36+
# Junit test output
37+
tests/*-junit.xml
38+
39+
# YAML tests
40+
tests/Elasticsearch/Tests/Yaml

.travis.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

travis/download_and_run_es.sh

Lines changed: 0 additions & 34 deletions
This file was deleted.

travis/generate_docs.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

travis/run_es_docker.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)