-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d3bdda
commit d1b5f21
Showing
1 changed file
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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:[email protected]/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@<tag> # <tag> 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 | ||
``` |