From d1b5f21b18694673c073cf4297d2b4d491f4d350 Mon Sep 17 00:00:00 2001 From: Jakub Tobiasz Date: Fri, 21 Oct 2022 11:37:08 +0200 Subject: [PATCH] Update README.md --- README.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b9fa55e..f89d95d 100644 --- a/README.md +++ b/README.md @@ -1 +1,62 @@ -Test action to remove repeating steps from Sylius' CI build `c:`. +# Sylius Build Test Application GitHub Action + +The goal of this action is to reduce the repetitive part of our every Sylius GitHub Workflow file. + +## Usage + +Below you can find an example of a workflow file that uses this action. Keep in mind `actions/checkout@v2` and `shivammathur/setup-php@v2` +action are required and must be run **before** `SyliusLabs/BuildTestAppAction` action. + +```yaml +name: Sample Workflow + +on: + push: ~ + +jobs: + tests: + runs-on: ubuntu-latest + + name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}" + + env: + APP_ENV: test_cached + DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}" + + strategy: + fail-fast: false + matrix: + php: [ "8.1" ] + symfony: [ "^5.4" ] + sylius: [ "^1.11" ] + node: [ "16.x" ] + mysql: [ "8.0" ] + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + env: + runner: self-hosted + with: + php-version: "${{ matrix.php }}" + extensions: intl + tools: symfony + coverage: none + + - name: Build test application + uses: SyliusLabs/BuildTestAppAction@ # is the version of the action you want to use, you can find the latest version on the releases page + with: + sylius-version: "${{ matrix.sylius }}" # Sylius version, required + symfony-version: "${{ matrix.symfony }}" # Symfony version, required + mysql-version: "${{ matrix.mysql }}" # MySQL version, required + node-version: "${{ matrix.node }}" # Node version, optional, default: 16.x + environment: "test" # Environment, optional, default: test + working-directory: "src/SomeSyliusPlugin" # Working directory in which commands are run, optional, default: "." (root directory) + plugin-build: "yes" # Tells whether we build an app or plugin, optional, default: no + + - name: Run Behat + run: | + vendor/bin/behat +```