-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves broken tests on local and adds GH actions pipeline (#63)
* Resolves broken tests on local and adds gh actions pipeline * additional cleanup * remove sniffer config * remove static analyzers for now * updates pipeline to deal with cake4 requiring php 7.4 * cleanup and emit deprecation warning on deprecated method * adds elastic search test into gh action pipeline with a custom integration test, uses mocks for testing elastic locally, some other cleanup * tests pipeline without elastic to debug * resolve timezone bug * resolve timezone bug * resolve timezone bug * resolve timezone bug * resolve timezone bug * resolve timezone bug * resolve timezone bug * resolve timezone bug * resolve timezone bug * skip timezone bug and enable elastic again * debugging this: elastic/elastic-github-actions#23 * bad copy pasta * debug datetime issue * oh well * oh well 2 * adds #[\ReturnTypeWillChange] to suppress deprecation warnings 8.0/8.1 * cleanup * docblock updates * re-adds integration test and removes a deprecation warning in php 8.1 * testing pipeline * fix test namespaces * try getting elastc running in pipeline again using setup from cakephp/elastic * try getting elastc running in pipeline again using setup from cakephp/elastic * try getting elastc running in pipeline again using setup from cakephp/elastic * fix names
- Loading branch information
1 parent
58f0c65
commit c03812d
Showing
24 changed files
with
505 additions
and
320 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
name: Pull Request | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
operating-system: [ ubuntu-20.04 ] | ||
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] | ||
|
||
name: PHP ${{ matrix.php-versions }} Test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: mbstring, intl, xdebug | ||
|
||
- name: PHP Version | ||
run: php -v | ||
|
||
- name: Install dependencies | ||
if: steps.composer-cache.outputs.cache-hit != 'true' | ||
run: | | ||
composer self-update | ||
composer validate | ||
composer install --prefer-dist --no-progress | ||
- name: Test Suite | ||
run: | | ||
composer test | ||
# | ||
# CakePHP version compatability | ||
# | ||
compatibility: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
version: ['~4.0.0', '~4.1.0', '~4.2.0', '~4.3.0'] | ||
|
||
name: CakePHP ${{ matrix.version }} Test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.2' | ||
extensions: mbstring, intl | ||
|
||
- name: PHP Version | ||
run: php -v | ||
|
||
- name: CakePHP ${{matrix.version}} Compatability | ||
run: | | ||
composer self-update | ||
rm -rf composer.lock | ||
composer require cakephp/cakephp:${{matrix.version}} --no-update | ||
composer install --prefer-dist --no-progress | ||
composer test | ||
compatibility_cakephp4: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
version: ['~4.4.0'] | ||
|
||
name: CakePHP ${{ matrix.version }} Test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
extensions: mbstring, intl | ||
|
||
- name: PHP Version | ||
run: php -v | ||
|
||
- name: CakePHP ${{matrix.version}} Compatability | ||
run: | | ||
composer self-update | ||
rm -rf composer.lock | ||
composer require cakephp/cakephp:${{matrix.version}} --no-update | ||
composer install --prefer-dist --no-progress | ||
composer test | ||
elastic_integration_test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
version: ['~4.4.0'] | ||
|
||
services: | ||
elasticsearch: | ||
image: elasticsearch:7.11.1 | ||
ports: | ||
- 9200/tcp | ||
env: | ||
discovery.type: single-node | ||
ES_JAVA_OPTS: -Xms500m -Xmx500m | ||
options: >- | ||
--health-cmd "curl http://127.0.0.1:9200/_cluster/health" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 10 | ||
name: Elastic Search Integration Test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
extensions: mbstring, intl | ||
|
||
- name: PHP Version | ||
run: php -v | ||
|
||
- name: Test | ||
env: | ||
elastic_dsn: Cake\ElasticSearch\Datasource\Connection://127.0.0.1:${{ job.services.elasticsearch.ports['9200'] }}?driver=Cake\ElasticSearch\Datasource\Connection | ||
run: | | ||
composer self-update | ||
rm -rf composer.lock | ||
composer require cakephp/cakephp:${{matrix.version}} --no-update | ||
composer install --prefer-dist --no-progress | ||
vendor/bin/phpunit tests/TestCase/Persister/ElasticSearchPersisterIntegrationTest.php |
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
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
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
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.