-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from spryker-eco/feature/dev-te-7947-add-githu…
…b-action-and-remove-travis-from-eco feature/dev-te-7947-add-github-action-and-remove-travis-from-eco
- Loading branch information
Showing
3 changed files
with
103 additions
and
47 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 |
---|---|---|
|
@@ -7,60 +7,118 @@ on: | |
- master | ||
workflow_dispatch: | ||
|
||
env: | ||
SPRYKER_TESTING_ENABLED: 1 | ||
APPLICATION_STORE: DE | ||
POSTGRES_PORT: 5433 | ||
DB_USER: postgres | ||
DB_NAME: DE_test_zed | ||
DB_PASSWORD: pwd | ||
MODULE_DIR: module | ||
SHOP_DIR: current | ||
MODULE_NAME: payone | ||
|
||
jobs: | ||
validation: | ||
name: "Validation" | ||
test_pgsql: | ||
name: "Test / PostgreSQL" | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- php: '7.4' | ||
|
||
php: [ '7.3', ] | ||
product: [ 'suite' ] | ||
composer_preference: ['', '--prefer-lowest'] | ||
services: | ||
rabbitmq: | ||
image: rabbitmq | ||
ports: | ||
- 5672:5672 | ||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
postgres: | ||
image: postgres:12 | ||
env: | ||
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }} | ||
DB_USER: ${{ env.DB_USER }} | ||
DB_NAME: ${{ env.DB_NAME }} | ||
ports: | ||
- 5433:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
env: | ||
APPLICATION_ENV: devtest | ||
APPLICATION_STORE: DE | ||
PROJECT: payone | ||
PRODUCT_NAME: ${{ matrix.product }} | ||
APPLICATION_ENV: ci.pgsql | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: mbstring, intl | ||
tools: composer:v2 | ||
|
||
- name: 'Run Elasticsearch' | ||
uses: elastic/elastic-github-actions/elasticsearch@master | ||
with: | ||
stack-version: 7.6.0 | ||
|
||
- name: Install eco-ci | ||
run: git clone https://github.com/spryker-eco/eco-ci.git ecoci | ||
|
||
- name: Execute test script | ||
run: ./ecoci/build/ga.sh ${{ matrix.composer_preference }} | ||
test_mariadb: | ||
name: "Test / MariaDB" | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '7.3', ] | ||
product: [ 'suite' ] | ||
composer_preference: [ '', '--prefer-lowest' ] | ||
services: | ||
rabbitmq: | ||
image: rabbitmq | ||
ports: | ||
- 5672:5672 | ||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
env: | ||
PRODUCT_NAME: ${{ matrix.product }} | ||
APPLICATION_ENV: ci.mysql | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
|
||
- 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: Composer get cache directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Composer cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Composer validate | ||
run: composer validate | ||
- uses: getong/[email protected] | ||
with: | ||
character set server: 'utf8' | ||
collation server: 'utf8_general_ci' | ||
mariadb version: '10.3' | ||
mysql database: ${{ env.DB_NAME }} | ||
mysql root password: ${{ env.DB_PASSWORD }} | ||
|
||
- name: Composer install | ||
run: | | ||
composer --version | ||
composer install | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: mbstring, intl | ||
tools: composer:v2 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: mbstring, intl | ||
tools: composer:v2 | ||
|
||
- name: Run CodeStyle checks | ||
run: composer cs-check | ||
- name: 'Run Elasticsearch' | ||
uses: elastic/elastic-github-actions/elasticsearch@master | ||
with: | ||
stack-version: 7.6.0 | ||
|
||
- name: PHPStan setup | ||
run: composer stan-setup | ||
- name: Install eco-ci | ||
run: git clone https://github.com/spryker-eco/eco-ci.git ecoci | ||
|
||
- name: Run PHPStan | ||
run: composer stan | ||
- name: Execute test script | ||
run: ./ecoci/build/ga.sh ${{ matrix.composer_preference }} |
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