-
Notifications
You must be signed in to change notification settings - Fork 974
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed Travis CI in favor of Github action
- Loading branch information
Showing
19 changed files
with
242 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: PHP test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
php-version: [7.1, 7.2, 7.3, 7.4] | ||
os: [ubuntu-latest] | ||
es-version: [7.x-SNAPSHOT] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use PHP ${{ matrix.php-version }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
tools: prestissimo | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get composer cache directory | ||
id: composercache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composercache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer install --prefer-dist | ||
- name: PHP Coding Standards | ||
run: | | ||
composer run-script phpcs | ||
- name: PHP Static Analysis Tool | ||
run: | | ||
composer run-script phpstan | ||
- name: Unit tests | ||
run: | | ||
vendor/bin/phpunit -c phpunit.xml.dist | ||
env: | ||
TEST_SUITE: oss | ||
|
||
- name: Configure sysctl limits | ||
run: | | ||
sudo swapoff -a | ||
sudo sysctl -w vm.swappiness=1 | ||
sudo sysctl -w fs.file-max=262144 | ||
sudo sysctl -w vm.max_map_count=262144 | ||
- name: Runs Elasticsearch ${{ matrix.es-version }} | ||
uses: elastic/elastic-github-actions/elasticsearch@master | ||
with: | ||
stack-version: ${{ matrix.es-version }} | ||
|
||
- name: Integration tests | ||
run: | | ||
vendor/bin/phpunit -c phpunit-integration-tests.xml | ||
env: | ||
TEST_SUITE: oss | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.3/phpunit.xsd" | ||
bootstrap="tests/bootstrap.php" | ||
colors="true" | ||
failOnRisky="true" | ||
verbose="true" | ||
beStrictAboutChangesToGlobalState="true" | ||
beStrictAboutOutputDuringTests="true" | ||
> | ||
<testsuites> | ||
<testsuite name="Integration tests"> | ||
<directory>tests</directory> | ||
<exclude>tests/Elasticsearch/Tests/YamlRunnerTest.php</exclude> | ||
</testsuite> | ||
</testsuites> | ||
<groups> | ||
<include> | ||
<group>Integration</group> | ||
</include> | ||
</groups> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src</directory> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.3/phpunit.xsd" | ||
bootstrap="tests/bootstrap.php" | ||
colors="true" | ||
failOnRisky="true" | ||
verbose="true" | ||
beStrictAboutChangesToGlobalState="true" | ||
beStrictAboutOutputDuringTests="true" | ||
> | ||
<php> | ||
<!-- Disable E_USER_DEPRECATED setting E_ALL & ~E_USER_DEPRECATED--> | ||
<ini name="error_reporting" value="16383"/> | ||
</php> | ||
<testsuites> | ||
<testsuite name="Yaml tests"> | ||
<file>tests/Elasticsearch/Tests/YamlRunnerTest.php</file> | ||
</testsuite> | ||
</testsuites> | ||
<groups> | ||
<include> | ||
<group>sync</group> | ||
</include> | ||
</groups> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src</directory> | ||
</whitelist> | ||
</filter> | ||
<logging> | ||
<log type="junit" target="tests/yaml-test-junit.xml"/> | ||
</logging> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.