Skip to content

Commit

Permalink
Allow to provide Sylius integration
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubtobiasz committed Oct 20, 2022
1 parent b869f3a commit 0273af3
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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)"
Expand All @@ -122,83 +134,83 @@ 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
shell: bash
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
Expand Down

0 comments on commit 0273af3

Please sign in to comment.