Skip to content

Commit a690929

Browse files
update github build (add trix matrix)
1 parent 62bbbed commit a690929

1 file changed

Lines changed: 29 additions & 14 deletions

File tree

.github/workflows/build.yml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
tests:
1515
runs-on: ubuntu-latest
1616

17-
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"
17+
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, Trix ${{ matrix.trix }}"
1818

1919
strategy:
2020
fail-fast: false
@@ -24,6 +24,7 @@ jobs:
2424
sylius: ["~1.13.0", "~1.14.0"]
2525
node: ["20.x"]
2626
mysql: ["8.0"]
27+
trix: [false, true]
2728

2829
exclude:
2930
- sylius: "~1.14.0"
@@ -108,7 +109,17 @@ jobs:
108109
109110
- name: Install JS dependencies
110111
run: |
111-
(cd tests/Application && yarn install)
112+
cd tests/Application
113+
if [ "${{ matrix.trix }}" = "true" ]; then
114+
yarn add trix
115+
sed -i "s/wysiwyg: 'ckeditor'/wysiwyg: 'trix'/" webpack.config.js
116+
fi
117+
yarn install
118+
119+
- name: Configure Trix if enabled
120+
if: matrix.trix == true
121+
run: |
122+
echo "bit_bag_sylius_cms:\n wysiwyg_editor: trix" >> tests/Application/config/packages/bitbag_sylius_cms_plugin.yaml
112123
113124
- name: Prepare test application database
114125
run: |
@@ -138,8 +149,12 @@ jobs:
138149
- name: Run PHPUnit
139150
run: vendor/bin/phpunit --colors=always
140151

152+
- name: Set Behat tags
153+
if: matrix.trix != true
154+
run: echo "BEHAT_TAGS=--tags='~@wysiwyg'" >> $GITHUB_ENV
155+
141156
- name: Run Behat
142-
run: vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun
157+
run: vendor/bin/behat ${{ env.BEHAT_TAGS }} --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat ${{ env.BEHAT_TAGS }} --colors --strict -vvv --no-interaction -f progress --rerun
143158

144159
- name: Upload Behat logs
145160
uses: actions/upload-artifact@v4
@@ -149,14 +164,14 @@ jobs:
149164
path: etc/build/
150165
if-no-files-found: ignore
151166

152-
- name: Failed build Slack notification
153-
uses: rtCamp/action-slack-notify@v2
154-
if: ${{ failure() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') }}
155-
env:
156-
SLACK_CHANNEL: ${{ secrets.FAILED_BUILD_SLACK_CHANNEL }}
157-
SLACK_COLOR: ${{ job.status }}
158-
SLACK_ICON: https://github.com/rtCamp.png?size=48
159-
SLACK_MESSAGE: ':x:'
160-
SLACK_TITLE: Failed build on ${{ github.event.repository.name }} repository
161-
SLACK_USERNAME: ${{ secrets.FAILED_BUILD_SLACK_USERNAME }}
162-
SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }}
167+
# - name: Failed build Slack notification
168+
# uses: rtCamp/action-slack-notify@v2
169+
# if: ${{ failure() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') }}
170+
# env:
171+
# SLACK_CHANNEL: ${{ secrets.FAILED_BUILD_SLACK_CHANNEL }}
172+
# SLACK_COLOR: ${{ job.status }}
173+
# SLACK_ICON: https://github.com/rtCamp.png?size=48
174+
# SLACK_MESSAGE: ':x:'
175+
# SLACK_TITLE: Failed build on ${{ github.event.repository.name }} repository
176+
# SLACK_USERNAME: ${{ secrets.FAILED_BUILD_SLACK_USERNAME }}
177+
# SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }}

0 commit comments

Comments
 (0)