Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate test application automatically #13

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 26 additions & 20 deletions .github/workflows/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches: [ master ]
pull_request:
schedule:
- cron: '0 0 * * *'

jobs:

Expand All @@ -19,8 +17,13 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.4']
sylius: ['1.8.0', '1.9.0']
php: ['7.4' ,'8.0']
sylius: ["~1.8.0", "~1.9.0", "~1.10.0"]
exclude:
- php: 8.0
sylius: "~1.8.0"
- php: 8.0
sylius: "~1.9.0"

steps:
- name: Setup PHP
Expand All @@ -41,25 +44,30 @@ jobs:
docker run --rm --name flex -d -v $PWD/plugin/recipes:/var/www/flex/var/repo/private/monsieurbiz/sylius-advanced-option-plugin -p 80:80 docker.pkg.github.com/monsieurbiz/docker/symfony-flex-server:latest contrib official
docker ps

- run: mkdir -p /home/runner/{.composer/cache,.config/composer}

- uses: actions/cache@v1
id: cache-composer
with:
path: /home/runner/.composer/cache
key: composer-php:${{ matrix.php }}-${{ github.sha }}
restore-keys: composer-php:${{ matrix.php }}-

- run: mkdir -p /home/runner/.composer/cache
if: steps.cache-composer.outputs.cache-hit != 'true'
key: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-${{ github.sha }}
restore-keys: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-

- name: Composer v1
run: sudo composer self-update --1
- name: Composer v2
run: sudo composer self-update --2

- name: Composer Github Auth
run: composer config -g github-oauth.github.com ${{ github.token }}

- name: Install Sylius-Standard
- name: Create Sylius-Standard project without install
run: |
composer create-project --prefer-dist --no-scripts --no-progress --no-install sylius/sylius-standard sylius "${{ matrix.sylius }}"

# Because the sylius-standard has a soft constraint
- name: Make sure to install the required version of Sylius
working-directory: ./sylius
run: |
composer create-project --prefer-dist --no-scripts --no-progress sylius/sylius-standard sylius "~${{ matrix.sylius }}"
composer require --no-install --no-scripts --no-progress sylius/sylius="${{ matrix.sylius }}"

- name: Setup some requirements
working-directory: ./sylius
Expand All @@ -68,18 +76,16 @@ jobs:
composer config extra.symfony.allow-contrib true
composer config secure-http false
composer config --unset platform.php
- name: Install monsieurbiz/sylius-rich-editor-plugin

- name: Require plugin without install
working-directory: ./sylius
run: |
composer require monsieurbiz/sylius-rich-editor-plugin="^2.0@RC" --no-scripts
sed -i -e "s/];/MonsieurBiz\\\SyliusRichEditorPlugin\\\MonsieurBizSyliusRichEditorPlugin::class => ['all' => true], ];/g" config/bundles.php
cp -Rv vendor/monsieurbiz/sylius-rich-editor-plugin/recipes/2.0-dev/config/* config/
composer require --no-install --no-update monsieurbiz/sylius-advanced-option-plugin="*@dev"

- name: Install plugin
- name: Composer install
working-directory: ./sylius
run: |
composer require monsieurbiz/sylius-advanced-option-plugin="*@dev"
composer install

- name: Show flex server logs
run: docker logs --tail 100 flex
17 changes: 7 additions & 10 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Security
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'

jobs:

Expand All @@ -15,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.4]
php: ['7.4', '8.0']

steps:
- uses: actions/checkout@v2
Expand All @@ -30,22 +28,21 @@ jobs:
id: cache-composer
with:
path: /home/runner/.composer/cache
key: composer-php:${{ matrix.php }}-${{ github.sha }}
restore-keys: composer-php:${{ matrix.php }}-
key: composer2-php:${{ matrix.php }}-${{ github.sha }}
restore-keys: composer2-php:${{ matrix.php }}-

- run: mkdir -p /home/runner/.composer/cache
- run: mkdir -p /home/runner/{.composer/cache,.config/composer}
if: steps.cache-composer.outputs.cache-hit != 'true'

- name: Composer v1
run: sudo composer self-update --1
- name: Composer v2
run: sudo composer self-update --2

- name: Composer Github Auth
run: composer config -g github-oauth.github.com ${{ github.token }}

- uses: actions/checkout@v2

- name: Install PHP dependencies
run: composer update --prefer-dist

- uses: symfonycorp/security-checker-action@v2

12 changes: 7 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches: [ master ]
pull_request:
schedule:
- cron: '0 0 * * *'

jobs:

Expand All @@ -16,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.4']
php: ['7.4', '8.0']

env:
SYMFONY_ARGS: --no-tls
Expand All @@ -25,6 +23,9 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'

- name: Setup PHP
run: |
Expand All @@ -37,15 +38,16 @@ jobs:
curl https://get.symfony.com/cli/installer | bash
echo "${HOME}/.symfony/bin" >> $GITHUB_PATH

- run: mkdir -p /home/runner/{.composer/cache,.config/composer}

- uses: actions/cache@v1
id: cache-composer
with:
path: /home/runner/.composer/cache
key: composer2-php:${{ matrix.php }}-${{ github.sha }}
restore-keys: composer2-php:${{ matrix.php }}-

- run: mkdir -p /home/runner/{.composer/cache,.config/composer}
if: steps.cache-composer.outputs.cache-hit != 'true'

- name: Composer v2
run: sudo composer self-update --2

Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
/etc/build/*
!/etc/build/.gitignore

/tests/Application/yarn.lock
/tests/Application/package-lock.json
/tests/Application/.php-version
/tests/Application

/behat.yml
/phpspec.yml

/package-lock.json

/.php-version
/php.ini
/.phpunit.result.cache
/node_modules
/yarn.lock
Loading