Skip to content

Commit e827475

Browse files
authored
[CI] Add E2E tests (#30)
Add a "e2e" job to test install and usage on a new Symfony app <img width="670" alt="image" src="https://github.com/user-attachments/assets/87e854f1-f6e6-4680-a6ff-feb9bd002b8f" /> Thanks to @Kocal, from whom i took most of this E2E test :)
1 parent 5ac418e commit e827475

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/CI.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,59 @@ jobs:
139139
# uses: codecov/codecov-action@v4.0.1
140140
# with:
141141
# token: ${{ secrets.CODECOV_TOKEN }}
142+
143+
144+
e2e:
145+
#
146+
# This job is largely based on the BiomeJsBundle CI workflow written by Kocal
147+
# https://github.com/Kocal/BiomeJsBundle/
148+
#
149+
name: E2E dev (${{ matrix.os }})
150+
strategy:
151+
matrix:
152+
os:
153+
- ubuntu-latest
154+
# - windows-latest
155+
# - macos-latest
156+
runs-on: ${{ matrix.os }}
157+
steps:
158+
- uses: actions/checkout@v4
159+
160+
- name: "PHP: setup (8.4)"
161+
uses: shivammathur/setup-php@v2
162+
with:
163+
php-version: 8.4
164+
tools: symfony-cli
165+
166+
- name: "[Composer] Install dependencies"
167+
run: symfony composer install --prefer-dist --no-interaction --no-progress
168+
169+
- name: "[Symfony] Create new webapp"
170+
run: |
171+
git config --global user.email "smn.andre@gmail.com"
172+
git config --global user.name "Simon André"
173+
symfony new my_app --webapp
174+
175+
- name: "[Composer] Add sensiolabs/minify-bundle"
176+
run: |
177+
symfony composer config repositories.minify-bundle '{"type":"path", "url":"../","options":{"symlink":true}}'
178+
symfony composer config minimum-stability dev
179+
symfony composer config --json extra.symfony.allow-contrib 'true'
180+
symfony composer require 'sensiolabs/minify-bundle:*' --no-interaction
181+
working-directory: my_app
182+
183+
- name: "[Minify] Check configuration"
184+
run: symfony console debug:config sensiolabs_minify -v
185+
working-directory: my_app
186+
187+
- name: "[Minify] Run minify:install"
188+
run: symfony console minify:install -v
189+
working-directory: my_app
190+
191+
- name: "[Minify] Run minify:asset"
192+
run: symfony console minify:asset assets/styles/app.css -v
193+
working-directory: my_app
194+
195+
- name: "[Minify] Run asset-map:compile"
196+
run: symfony console asset-map:compile -vv
197+
working-directory: my_app

0 commit comments

Comments
 (0)