Skip to content

Commit cdf2af6

Browse files
author
Dmitriy
committed
ci(workflows): standardize Node.js and package manager versions across all examples
- Update workflows to use exact versions from each project's package.json - Use corepack to prepare specific npm/pnpm/yarn versions - Merge Bun workflow into Playwright workflow using oven-sh/setup-bun - Update Ubuntu base from jammy (22.04) to noble (24.04) for Playwright - Add runtime conditionals (node/bun) in unified Playwright workflow - Update selenium-template.yml with explicit package manager parameters - Split selenium tests into organized job groups by SB version - Update AGENTS.md documentation with correct workflow info
1 parent fa1f22f commit cdf2af6

6 files changed

Lines changed: 247 additions & 113 deletions

File tree

.github/workflows/creevey-bun.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/workflows/creevey-playwright.yml

Lines changed: 74 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Creevey Screenshot Tests - Playwright Docker
1+
name: Creevey Screenshot Tests - Playwright
22

33
on:
44
push:
@@ -13,36 +13,104 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
include:
16+
# Node.js + Playwright projects
1617
- fixture: playwright-esm-vite-sb9
18+
node-version: '22'
19+
runtime: node
20+
package-manager: npm
21+
package-manager-version: '10.9.7'
1722
- fixture: playwright-esm-vite-sb10-react19
23+
node-version: '24'
24+
runtime: node
25+
package-manager: npm
26+
package-manager-version: '10.9.7'
27+
# Bun + Playwright project
28+
- fixture: playwright-esm-vite-sb10-bun
29+
bun-version: '1.3.11'
30+
runtime: bun
1831

1932
runs-on: ubuntu-latest
2033
container:
21-
image: mcr.microsoft.com/playwright:v1.50.0-jammy
34+
image: mcr.microsoft.com/playwright:v1.59.1-noble
2235
options: --ipc=host
2336

2437
steps:
2538
- name: Checkout code
2639
uses: actions/checkout@v4
2740

28-
- name: Install dependencies
41+
# Setup for Node.js projects
42+
- name: Setup Node.js
43+
if: matrix.runtime == 'node'
44+
uses: actions/setup-node@v4
45+
with:
46+
node-version: ${{ matrix.node-version }}
47+
48+
- name: Setup Bun
49+
if: matrix.runtime == 'bun'
50+
uses: oven-sh/setup-bun@v2
51+
with:
52+
bun-version: ${{ matrix.bun-version }}
53+
54+
# Install dependencies (Node.js)
55+
- name: Enable Corepack (Node)
56+
if: matrix.runtime == 'node'
57+
run: corepack enable
58+
59+
- name: Prepare package manager (Node)
60+
if: matrix.runtime == 'node'
61+
run: corepack prepare ${{ matrix.package-manager }}@${{ matrix.package-manager-version }} --activate
62+
63+
- name: Install dependencies (Node)
64+
if: matrix.runtime == 'node'
2965
working-directory: ${{ matrix.fixture }}
3066
run: npm install
3167

32-
- name: Build Storybook
68+
# Install dependencies (Bun)
69+
- name: Install dependencies (Bun)
70+
if: matrix.runtime == 'bun'
71+
working-directory: ${{ matrix.fixture }}
72+
run: bun install
73+
74+
# Build Storybook (Node)
75+
- name: Build Storybook (Node)
76+
if: matrix.runtime == 'node'
3377
working-directory: ${{ matrix.fixture }}
3478
run: npm run build-storybook
3579

36-
- name: Start Storybook server
80+
# Build Storybook (Bun)
81+
- name: Build Storybook (Bun)
82+
if: matrix.runtime == 'bun'
83+
working-directory: ${{ matrix.fixture }}
84+
run: bun run build-storybook
85+
86+
# Start Storybook server (Node)
87+
- name: Start Storybook server (Node)
88+
if: matrix.runtime == 'node'
3789
working-directory: ${{ matrix.fixture }}
3890
run: |
3991
npx http-server ./storybook-static -p 6006 -s &
4092
npx wait-on http://localhost:6006 --timeout 30000
4193
42-
- name: Run Creevey tests
94+
# Start Storybook server (Bun)
95+
- name: Start Storybook server (Bun)
96+
if: matrix.runtime == 'bun'
97+
working-directory: ${{ matrix.fixture }}
98+
run: |
99+
bunx http-server ./storybook-static -p 6006 -s &
100+
bunx wait-on http://localhost:6006 --timeout 30000
101+
102+
# Run Creevey tests (Node)
103+
- name: Run Creevey tests (Node)
104+
if: matrix.runtime == 'node'
43105
working-directory: ${{ matrix.fixture }}
44106
run: npx creevey --debug
45107

108+
# Run Creevey tests (Bun)
109+
- name: Run Creevey tests (Bun)
110+
if: matrix.runtime == 'bun'
111+
working-directory: ${{ matrix.fixture }}
112+
run: bunx creevey --debug
113+
46114
- name: Upload test results
47115
if: always()
48116
uses: actions/upload-artifact@v4

.github/workflows/creevey-selenium.yml

Lines changed: 63 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,82 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
# Standard Selenium projects (Node 20, alpine)
12-
selenium-tests:
11+
# SB8 Projects (Node 20, npm 10.9.7)
12+
sb8-selenium-tests:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
fixture:
17-
- cjs-webpack-sb8
18-
- cjs-vite-sb8
19-
- esm-webpack-sb8
20-
- esm-vite-sb8
21-
- esm-vite-sb9
2216
include:
23-
- fixture: esm-vite-sb9-yarn-pnp
17+
- fixture: cjs-webpack-sb8
2418
node-version: '20'
25-
- fixture: esm-vite-sb9-pnpm
19+
package-manager: npm
20+
package-manager-version: '10.9.7'
21+
- fixture: cjs-vite-sb8
22+
node-version: '20'
23+
package-manager: npm
24+
package-manager-version: '10.9.7'
25+
- fixture: esm-webpack-sb8
2626
node-version: '20'
27+
package-manager: npm
28+
package-manager-version: '10.9.7'
29+
- fixture: esm-vite-sb8
30+
node-version: '20'
31+
package-manager: npm
32+
package-manager-version: '10.9.7'
2733
uses: ./.github/workflows/selenium-template.yml
2834
with:
2935
fixture: ${{ matrix.fixture }}
30-
node-version: '20'
36+
node-version: ${{ matrix.node-version }}
37+
package-manager: ${{ matrix.package-manager }}
38+
package-manager-version: ${{ matrix.package-manager-version }}
3139

32-
# Playwright variant (requires full Node image)
33-
selenium-playwright:
40+
# SB9 Projects (Node 22, npm 10.9.7)
41+
sb9-selenium-tests:
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
include:
46+
- fixture: esm-vite-sb9
47+
node-version: '22'
48+
package-manager: npm
49+
package-manager-version: '10.9.7'
50+
- fixture: esm-vite-sb9-playwright
51+
node-version: '22'
52+
package-manager: npm
53+
package-manager-version: '10.9.7'
3454
uses: ./.github/workflows/selenium-template.yml
3555
with:
36-
fixture: esm-vite-sb9-playwright
37-
node-version: '20'
38-
use-full-node: true
56+
fixture: ${{ matrix.fixture }}
57+
node-version: ${{ matrix.node-version }}
58+
package-manager: ${{ matrix.package-manager }}
59+
package-manager-version: ${{ matrix.package-manager-version }}
60+
61+
# SB9 Package Manager Variants (Node 22)
62+
sb9-package-variants:
63+
strategy:
64+
fail-fast: false
65+
matrix:
66+
include:
67+
- fixture: esm-vite-sb9-pnpm
68+
node-version: '22'
69+
package-manager: pnpm
70+
package-manager-version: '9.15.9'
71+
- fixture: esm-vite-sb9-yarn-pnp
72+
node-version: '22'
73+
package-manager: yarn
74+
package-manager-version: '4.13.0'
75+
uses: ./.github/workflows/selenium-template.yml
76+
with:
77+
fixture: ${{ matrix.fixture }}
78+
node-version: ${{ matrix.node-version }}
79+
package-manager: ${{ matrix.package-manager }}
80+
package-manager-version: ${{ matrix.package-manager-version }}
3981

40-
# Storybook 10 projects (requires Node 22)
41-
selenium-sb10:
82+
# SB10 Project (Node 24, npm 10.9.7)
83+
sb10-selenium-tests:
4284
uses: ./.github/workflows/selenium-template.yml
4385
with:
4486
fixture: esm-vite-sb10
45-
node-version: '22'
87+
node-version: '24'
88+
package-manager: npm
89+
package-manager-version: '10.9.7'

.github/workflows/creevey-tests.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,45 @@ on:
1616
- all
1717
- selenium
1818
- playwright
19-
- bun
2019

2120
jobs:
22-
# Determine which tests to run
21+
# Selenium Grid tests
2322
selenium:
2423
if: ${{ github.event.inputs.test-type == 'all' || github.event.inputs.test-type == 'selenium' || github.event_name != 'workflow_dispatch' }}
2524
uses: ./.github/workflows/creevey-selenium.yml
2625
secrets: inherit
2726

27+
# Playwright tests (includes Bun)
2828
playwright:
2929
if: ${{ github.event.inputs.test-type == 'all' || github.event.inputs.test-type == 'playwright' || github.event_name != 'workflow_dispatch' }}
3030
uses: ./.github/workflows/creevey-playwright.yml
3131
secrets: inherit
3232

33-
bun:
34-
if: ${{ github.event.inputs.test-type == 'all' || github.event.inputs.test-type == 'bun' || github.event_name != 'workflow_dispatch' }}
35-
uses: ./.github/workflows/creevey-bun.yml
36-
secrets: inherit
37-
3833
# Summary job that depends on all test jobs
3934
test-summary:
40-
needs: [selenium, playwright, bun]
35+
needs: [selenium, playwright]
4136
if: always()
4237
runs-on: ubuntu-latest
4338
steps:
4439
- name: Test Summary
4540
run: |
4641
echo "## Creevey Test Results" >> $GITHUB_STEP_SUMMARY
4742
echo "" >> $GITHUB_STEP_SUMMARY
43+
echo "### Environment Versions" >> $GITHUB_STEP_SUMMARY
44+
echo "" >> $GITHUB_STEP_SUMMARY
45+
echo "| Component | Version |" >> $GITHUB_STEP_SUMMARY
46+
echo "|-----------|---------|" >> $GITHUB_STEP_SUMMARY
47+
echo "| SB8 Projects | Node 20 + npm 10.9.7 |" >> $GITHUB_STEP_SUMMARY
48+
echo "| SB9 Projects | Node 22 + npm 10.9.7 |" >> $GITHUB_STEP_SUMMARY
49+
echo "| SB10 Projects | Node 24 + npm 10.9.7 |" >> $GITHUB_STEP_SUMMARY
50+
echo "| pnpm Variant | Node 22 + pnpm 9.15.9 |" >> $GITHUB_STEP_SUMMARY
51+
echo "| Yarn PnP Variant | Node 22 + yarn 4.13.0 |" >> $GITHUB_STEP_SUMMARY
52+
echo "| Bun Variant | Bun 1.3.11 |" >> $GITHUB_STEP_SUMMARY
53+
echo "| Playwright | 1.59.1 |" >> $GITHUB_STEP_SUMMARY
54+
echo "" >> $GITHUB_STEP_SUMMARY
55+
echo "### Test Results" >> $GITHUB_STEP_SUMMARY
56+
echo "" >> $GITHUB_STEP_SUMMARY
4857
echo "| Test Type | Status |" >> $GITHUB_STEP_SUMMARY
4958
echo "|-----------|--------|" >> $GITHUB_STEP_SUMMARY
5059
echo "| Selenium Grid | ${{ needs.selenium.result }} |" >> $GITHUB_STEP_SUMMARY
51-
echo "| Playwright Docker | ${{ needs.playwright.result }} |" >> $GITHUB_STEP_SUMMARY
52-
echo "| Bun Runtime | ${{ needs.bun.result }} |" >> $GITHUB_STEP_SUMMARY
60+
echo "| Playwright (Node + Bun) | ${{ needs.playwright.result }} |" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)