Skip to content

Allow permission RBAC for sylius plus on routes #134

Allow permission RBAC for sylius plus on routes

Allow permission RBAC for sylius plus on routes #134

Workflow file for this run

name: Flex Recipe
on:
push:
branches: [ master ]
pull_request:
jobs:
recipe:
name: Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}
runs-on: ubuntu-latest
env:
SYMFONY_ENDPOINT: http://127.0.0.1/
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1', '8.2']
sylius: ['~1.10.0', '~1.11.0', '~1.12.0']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: date.timezone=UTC
- name: Set project php-version
run: |
echo ${{ matrix.php }} > .php-version
- uses: actions/checkout@v3
with:
path: plugin
# Run the server at the start so it can download the recipes!
- name: Run standalone symfony flex server
run: |
echo ${{ github.token }} | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
docker run --rm --name flex -d -v $PWD/plugin/recipes:/var/www/flex/var/repo/private/monsieurbiz/sylius-settings-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}
- name: Determine composer cache directory
id: composer-cache-directory
working-directory: plugin
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies installed with composer
uses: actions/cache@v3
id: cache-composer
with:
path: ${{ steps.composer-cache-directory.outputs.directory }}
key: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-${{ hashFiles('**/composer.json') }}
restore-keys: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-
- name: Ensure that composer cache directory exists
run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }}
- name: Composer Github Auth
run: composer config -g github-oauth.github.com ${{ github.token }}
- 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 require --no-install --no-scripts --no-progress sylius/sylius="${{ matrix.sylius }}"
- name: Setup some requirements
working-directory: ./sylius
run: |
composer config --no-plugins allow-plugins true
composer config repositories.plugin '{"type": "path", "url": "../plugin/"}'
composer config extra.symfony.allow-contrib true
composer config secure-http false
composer config --unset platform.php
- name: Require plugin without install
working-directory: ./sylius
run: |
composer require --no-install --no-scripts monsieurbiz/sylius-settings-plugin="*@dev"
- name: Composer install
working-directory: ./sylius
run: |
composer install
- name: Show flex server logs
run: docker logs --tail 100 flex