Skip to content

Commit

Permalink
minor #3 v2.1 update (jakubtobiasz)
Browse files Browse the repository at this point in the history
This PR was merged into the main branch.

Discussion
----------



Commits
-------

8320222 Update README for v2.1
fbf770e Unify setting up a database for all available engines
  • Loading branch information
TheMilek authored Apr 20, 2023
2 parents 9d480f7 + fbf770e commit d17d127
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ The goal of this action is to reduce the repetitive part of our every Sylius Git
Below you can find an example of a workflow file that uses this action. Keep in mind `actions/checkout@v2`
action is required and must be run **before** `SyliusLabs/BuildTestAppAction` action.

> **Note!** If you want to use this action with Sylius 1.12.7 or lower, please use version `2.0` of this action. Version `2.1` introduced
> a support for fixed PostgreSQL migrations (available since Sylius 1.12.8), and will fail on older Sylius versions.
```yaml
name: Example Workflow

Expand Down Expand Up @@ -36,7 +39,7 @@ jobs:
- uses: actions/checkout@v2

- name: Build application
uses: SyliusLabs/SyliusBuildTestAppAction@v2.0
uses: SyliusLabs/BuildTestAppAction@v2.1
with:
e2e: "yes"
database_version: ${{ matrix.mysql }}
Expand Down
13 changes: 1 addition & 12 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,24 +235,13 @@ runs:
# Prepare the application #
#####################################################################

- name: Prepare application database (MariaDB/MySQL)
if: inputs.database != 'postgresql'
- name: Prepare application database
run: |
bin/console doctrine:database:create --if-not-exists -vvv
bin/console doctrine:migrations:migrate -n -vvv
shell: bash
working-directory: "${{ env.application_dir }}"

- name: Prepare application database (PostgreSQL)
if: inputs.database == 'postgresql'
run: |
bin/console doctrine:database:create --if-not-exists -vvv
bin/console doctrine:schema:up --force -vvv
bin/console doctrine:schema:validate
bin/console doctrine:migrations:sync-metadata-storage
shell: bash
working-directory: "${{ env.application_dir }}"

- name: Install assets
run: bin/console assets:install public -vvv
shell: bash
Expand Down

0 comments on commit d17d127

Please sign in to comment.