Skip to content

Commit

Permalink
SC-9416: Migrate from Travis to Github Actions (#324)
Browse files Browse the repository at this point in the history
* SC-9416: added boot-syntax-check-tests.yml + deploy-file-builder-tests.yml

* SC-9416: added b2b+b2c support

* SC-9416: added all images with php 7.4

* SC-9416: added all images with php 7.4

* SC-9416: optimized image matrix
  • Loading branch information
zyuzka authored May 30, 2022
1 parent 5706cf9 commit 46a7ab7
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 161 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/b2b-b2c-demo-shop-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: B2B + B2C Demoshop tests
on:
- push

env:
SPRYKER_TESTING_ENABLED: 1
PROJECT: suite

jobs:
functional_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform-image: [
'spryker/php:7.4-alpine3.14',
'spryker/php:7.4-debian'
]
application-store: [ 'DE' ]
env: [
'ci.mysql',
'ci.pgsql'
]
repo: [
'https://github.com/spryker-shop/b2b-demo-shop.git',
'https://github.com/spryker-shop/b2c-demo-shop.git'
]
name: "Function Tests(Image: ${{ matrix.platform-image }}, Environment: ${{ matrix.env }}, Repo: ${{ matrix.repo }})"
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Clone demo shop
run: cd ../ && git clone --depth=3 --branch=master ${{ matrix.repo }} demo-shop && cp -R docker-sdk demo-shop

- name: Provide env variables
run: |
export SPRYKER_PLATFORM_IMAGE=${{ matrix.platform-image}}
export APPLICATION_ENV=${{ matrix.env }}
export APPLICATION_STORE=${{ matrix.application-store }}
- name: Run script
run: |
cd ../demo-shop
docker-sdk/sdk boot deploy.ci.functional.mariadb.yml -v
docker-sdk/sdk up -t -v
docker-sdk/sdk testing codecept run -c codeception.ci.functional.yml
glue_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform-image: [
'spryker/php:7.4-alpine3.15',
'spryker/php:7.4-debian-buster'
]
application-store: [ 'DE' ]
env: [
'ci.mysql',
'ci.pgsql'
]
repo: [
'https://github.com/spryker-shop/b2b-demo-shop.git',
'https://github.com/spryker-shop/b2c-demo-shop.git'
]
name: "Glue Tests(Image: ${{ matrix.platform-image }}, Environment: ${{ matrix.env }}, Repo: ${{ matrix.repo }})"
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Clone demo shop
run: cd ../ && git clone --depth=3 --branch=master ${{ matrix.repo }} demo-shop && cp -R docker-sdk demo-shop

- name: Provide env variables
run: |
export SPRYKER_PLATFORM_IMAGE=${{ matrix.platform-image}}
export APPLICATION_ENV=${{ matrix.env }}
export APPLICATION_STORE=${{ matrix.application-store }}
- name: Run script
run: |
cd ../demo-shop
docker-sdk/sdk boot deploy.ci.api.yml -v
docker-sdk/sdk up -t -v
docker-sdk/sdk testing codecept fixtures
docker-sdk/sdk testing console queue:worker:start --stop-when-empty
docker-sdk/sdk testing codecept run -c codeception.api.yml
74 changes: 74 additions & 0 deletions .github/workflows/boot-syntax-check-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Boot & Syntax check & tTests

on:
- push

jobs:
boot_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dev-mode: [
DEV_MODE=0,
DEV_MODE=1
]
name: Boot test
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Boot
run: |
export ${{ matrix.dev-mode }}
chmod +x sdk
if [[ $DEV_MODE == 0 ]] ; then ./sdk boot ci/deploy.yml; fi
if [[ $DEV_MODE == 1 ]] ; then ./sdk boot ci/deploy.dev.yml; fi
- name: Run script
run: bash ./ci/check_boot.sh

bash_syntax_check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dev-mode: [
DEV_MODE=0,
DEV_MODE=1
]
name: Bash syntax check
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Boot
run: |
export ${{ matrix.dev-mode }}
chmod +x sdk
if [[ $DEV_MODE == 0 ]] ; then ./sdk boot ci/deploy.yml; fi
if [[ $DEV_MODE == 1 ]] ; then ./sdk boot ci/deploy.dev.yml; fi
- name: Run script
run: bash ./ci/check_boot.sh

tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dev-mode: [ DEV_MODE=0, DEV_MODE=1 ]
name: Tests
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Boot
run: |
export ${{ matrix.dev-mode }}
chmod +x sdk
if [[ $DEV_MODE == 0 ]] ; then ./sdk boot ci/deploy.yml; fi
if [[ $DEV_MODE == 1 ]] ; then ./sdk boot ci/deploy.dev.yml; fi
- name: Run script
run: bash ./ci/tests.sh
27 changes: 27 additions & 0 deletions .github/workflows/deploy-file-builder-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy file builder tests

on:
- push

jobs:
deploy_file_builder_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: [ 7.4 ]
name: Deploy file builder tests
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}

- name: Run script
run: |
cd generator
composer install
vendor/bin/codecept run
161 changes: 0 additions & 161 deletions .travis.yml

This file was deleted.

0 comments on commit 46a7ab7

Please sign in to comment.