Skip to content

Commit bebece8

Browse files
committed
ci: réactive les tests Storybook avec Playwright
- Décommente les étapes de test Storybook dans le workflow GitHub - Ajoute http-server comme dépendance pour servir les fichiers statiques - Utilise start-server-and-test pour une gestion plus fiable du serveur - Installe Playwright avec Firefox pour éviter les problèmes de version - Configuration testée localement avec succès
1 parent 1bc12bf commit bebece8

File tree

3 files changed

+327
-23
lines changed

3 files changed

+327
-23
lines changed

.github/workflows/run-tests.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,11 @@ jobs:
3636
run: pnpm check-exports-ci
3737
- name: Test
3838
run: pnpm test
39-
# - name: Install Playwright with dependencies
40-
# run: pnpx playwright install --with-deps firefox
41-
39+
- name: Install Playwright browsers
40+
run: pnpx playwright install --with-deps firefox
4241
- name: Build Storybook
4342
run: pnpm build-storybook --quiet
44-
# - name: Serve Storybook and run tests
45-
# env:
46-
# TEST_STORYBOOK_URL: http://localhost:6006
47-
# run: |
48-
# pnpx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
49-
# "pnpx http-server storybook-static --port 6006 --silent" \
50-
# "pnpx wait-on tcp:6006 && pnpm test-storybook"
43+
- name: Run Storybook tests
44+
run: pnpx start-server-and-test 'pnpx http-server storybook-static --port 6006 --silent' http://localhost:6006 'pnpm test-storybook'
5145
- name: Build
5246
run: pnpm build

package.json

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133
"eslint-plugin-storybook": "10.0.2",
134134
"eslint-plugin-vue": "^9.32.0",
135135
"globby": "^14.1.0",
136+
"http-server": "^14.1.1",
136137
"husky": "^9.1.7",
137138
"inquirer": "^12.4.1",
138139
"jsdom": "^26.0.0",
@@ -184,9 +185,18 @@
184185
{
185186
"preset": "conventionalcommits",
186187
"releaseRules": [
187-
{ "type": "docs", "release": "patch" },
188-
{ "type": "refactor", "release": false },
189-
{ "type": "style", "release": false }
188+
{
189+
"type": "docs",
190+
"release": "patch"
191+
},
192+
{
193+
"type": "refactor",
194+
"release": false
195+
},
196+
{
197+
"type": "style",
198+
"release": false
199+
}
190200
]
191201
}
192202
],
@@ -196,14 +206,38 @@
196206
"preset": "conventionalcommits",
197207
"presetConfig": {
198208
"types": [
199-
{ "type": "feat", "section": "✨ Nouvelles fonctionnalités" },
200-
{ "type": "fix", "section": "🐛 Corrections de bugs" },
201-
{ "type": "docs", "section": "📚 Documentation" },
202-
{ "type": "perf", "section": "⚡ Améliorations de performance" },
203-
{ "type": "ci", "section": "👷 CI/CD" },
204-
{ "type": "test", "section": "✅ Tests" },
205-
{ "type": "refactor", "hidden": true },
206-
{ "type": "style", "hidden": true }
209+
{
210+
"type": "feat",
211+
"section": "✨ Nouvelles fonctionnalités"
212+
},
213+
{
214+
"type": "fix",
215+
"section": "🐛 Corrections de bugs"
216+
},
217+
{
218+
"type": "docs",
219+
"section": "📚 Documentation"
220+
},
221+
{
222+
"type": "perf",
223+
"section": "⚡ Améliorations de performance"
224+
},
225+
{
226+
"type": "ci",
227+
"section": "👷 CI/CD"
228+
},
229+
{
230+
"type": "test",
231+
"section": "✅ Tests"
232+
},
233+
{
234+
"type": "refactor",
235+
"hidden": true
236+
},
237+
{
238+
"type": "style",
239+
"hidden": true
240+
}
207241
]
208242
}
209243
}

0 commit comments

Comments
 (0)