From 0273af36cd647d5c3349bca9e286a1e6d031708d Mon Sep 17 00:00:00 2001 From: Jakub Tobiasz Date: Thu, 20 Oct 2022 21:07:23 +0200 Subject: [PATCH] Allow to provide Sylius integration --- action.yaml | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/action.yaml b/action.yaml index 4b5a9b4..9fb3971 100644 --- a/action.yaml +++ b/action.yaml @@ -5,6 +5,10 @@ inputs: sylius-version: required: true description: "The Sylius version to use." + integration: + required: false + description: "The Sylius integration to use (requires no-response-mate/composer-integration-plugin composer package installed)" + default: "" symfony-version: required: true description: "The Symfony version to use." @@ -102,6 +106,14 @@ runs: shell: bash working-directory: "${{ inputs.working-directory }}" + - name: Install Sylius integration + if: inputs.integration != '' + run: composer integration ${{ inputs.integration }} + env: + COMPOSER_ROOT_VERSION: dev-main + shell: bash + working-directory: "${{ inputs.working-directory }}" + - name: Get Yarn cache directory id: yarn-cache run: echo "::set-output name=dir::$(yarn cache dir)" @@ -122,66 +134,66 @@ runs: working-directory: "${{ inputs.working-directory }}" - name: Prepare test application database + if: ${{ inputs.plugin-build == 'yes' }} run: | (cd tests/Application && bin/console doctrine:database:create -vvv) (cd tests/Application && bin/console doctrine:migrations:migrate -n -vvv) shell: bash working-directory: "${{ inputs.working-directory }}" - if: ${{ inputs.plugin-build == 'yes' }} - name: Prepare test application database + if: ${{ inputs.plugin-build == 'no' }} run: | bin/console doctrine:database:create -vvv bin/console doctrine:migrations:migrate -n -vvv shell: bash working-directory: "${{ inputs.working-directory }}" - if: ${{ inputs.plugin-build == 'no' }} - name: Prepare test application assets + if: ${{ inputs.plugin-build == 'yes' }} run: | (cd tests/Application && bin/console assets:install public -vvv) (cd tests/Application && yarn build) shell: bash working-directory: "${{ inputs.working-directory }}" - if: ${{ inputs.plugin-build == 'yes' }} - name: Prepare test application assets + if: ${{ inputs.plugin-build == 'no' }} run: | bin/console assets:install public -vvv yarn build shell: bash working-directory: "${{ inputs.working-directory }}" - if: ${{ inputs.plugin-build == 'no' }} - name: Prepare test application cache + if: ${{ inputs.plugin-build == 'yes' }} run: (cd tests/Application && bin/console cache:warmup -vvv) shell: bash working-directory: "${{ inputs.working-directory }}" - if: ${{ inputs.plugin-build == 'yes' }} - name: Prepare test application cache + if: ${{ inputs.plugin-build == 'no' }} run: bin/console cache:warmup -vvv shell: bash working-directory: "${{ inputs.working-directory }}" - if: ${{ inputs.plugin-build == 'no' }} - name: Load fixtures in test application + if: ${{ inputs.plugin-build == 'yes' }} run: (cd tests/Application && bin/console sylius:fixtures:load -n) shell: bash working-directory: "${{ inputs.working-directory }}" - if: ${{ inputs.plugin-build == 'yes' }} - name: Load fixtures in test application + if: ${{ inputs.plugin-build == 'yes' }} run: (cd tests/Application && bin/console sylius:fixtures:load -n) shell: bash working-directory: "${{ inputs.working-directory }}" - if: ${{ inputs.plugin-build == 'yes' }} - name: Load fixtures in test application + if: ${{ inputs.plugin-build == 'no' }} run: bin/console sylius:fixtures:load -n shell: bash working-directory: "${{ inputs.working-directory }}" - if: ${{ inputs.plugin-build == 'no' }} - name: Validate composer.json run: composer validate --ansi --strict @@ -189,16 +201,16 @@ runs: working-directory: "${{ inputs.working-directory }}" - name: Validate database schema + if: ${{ inputs.plugin-build == 'yes' }} run: (cd tests/Application && bin/console doctrine:schema:validate) shell: bash working-directory: "${{ inputs.working-directory }}" - if: ${{ inputs.plugin-build == 'yes' }} - name: Validate database schema + if: ${{ inputs.plugin-build == 'no' }} run: bin/console doctrine:schema:validate shell: bash working-directory: "${{ inputs.working-directory }}" - if: ${{ inputs.plugin-build == 'no' }} branding: icon: activity