ci: Fix Storybook job for www
This commit is contained in:
7 files changed
+243
-51
No files matched your search
@@ -163,7 +163,42 @@ jobs:
|
|||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
test-www:
|
test-www:
|
||||||
name: Test - WWW & Storybook
|
name: Test - Unit
|
||||||
|
needs: build-configs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 9.12.3
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: 'pnpm'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
- name: Download Config Artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: config-artifacts
|
||||||
|
path: packages
|
||||||
|
- name: Test STL package
|
||||||
|
run: pnpm --filter @ermnvldmr/stl test:coverage
|
||||||
|
- name: Test UI package
|
||||||
|
run: pnpm --filter @ermnvldmr/ui test:coverage
|
||||||
|
- name: Test WWW service
|
||||||
|
run: pnpm --filter @ermnvldmr/www test:coverage
|
||||||
|
- name: Upload Unit coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v4
|
||||||
|
with:
|
||||||
|
files: ./services/www/coverage/lcov.info
|
||||||
|
flags: www
|
||||||
|
env:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
|
test-storybook:
|
||||||
|
name: Test - Storybook
|
||||||
needs: build-storybook
|
needs: build-storybook
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -185,19 +220,6 @@ jobs:
|
|||||||
path: packages
|
path: packages
|
||||||
- name: Install Playwright browsers
|
- name: Install Playwright browsers
|
||||||
run: pnpm --filter @ermnvldmr/www exec playwright install --with-deps chromium
|
run: pnpm --filter @ermnvldmr/www exec playwright install --with-deps chromium
|
||||||
- name: Test STL package
|
|
||||||
run: pnpm --filter @ermnvldmr/stl test:coverage
|
|
||||||
- name: Test UI package
|
|
||||||
run: pnpm --filter @ermnvldmr/ui test:coverage
|
|
||||||
- name: Test WWW service
|
|
||||||
run: pnpm --filter @ermnvldmr/www test:coverage
|
|
||||||
- name: Upload Unit coverage to Codecov
|
|
||||||
uses: codecov/codecov-action@v4
|
|
||||||
with:
|
|
||||||
files: ./services/www/coverage/lcov.info
|
|
||||||
flags: www
|
|
||||||
env:
|
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
- name: Download Storybook build
|
- name: Download Storybook build
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -12,18 +12,30 @@ jobs:
|
|||||||
setup-stage:
|
setup-stage:
|
||||||
name: Setup - Stage
|
name: Setup - Stage
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
cache-hit: ${{ steps.cache-pnpm-store.outputs.cache-hit }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
version: 9.12.3
|
version: 9.12.3
|
||||||
|
|
||||||
- name: Setup Node.js with pnpm cache
|
- name: Setup Node.js with pnpm cache
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Cache pnpm store
|
||||||
|
id: cache-pnpm-store
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.pnpm-store
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
@@ -43,14 +55,24 @@ jobs:
|
|||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
- name: Build configs
|
- name: Build Jest config
|
||||||
run: |
|
run: pnpm --filter @ermnvldmr/jest-config build
|
||||||
pnpm --filter @ermnvldmr/jest-config build
|
- name: Build Vite config
|
||||||
pnpm --filter @ermnvldmr/vite-config build
|
run: pnpm --filter @ermnvldmr/vite-config build
|
||||||
pnpm --filter @ermnvldmr/storybook-config build
|
- name: Build Storybook config
|
||||||
|
run: pnpm --filter @ermnvldmr/storybook-config build
|
||||||
|
- name: Upload Config Artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: config-artifacts
|
||||||
|
path: |
|
||||||
|
packages/jest-config/dist
|
||||||
|
packages/vite-config/dist
|
||||||
|
packages/storybook-config/dist
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
build-dependencies:
|
lint-www:
|
||||||
name: Build - Dependencies
|
name: Lint - WWW & Deps
|
||||||
needs: build-configs
|
needs: build-configs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -65,17 +87,21 @@ jobs:
|
|||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
- name: Build dependencies
|
- name: Download Config Artifacts
|
||||||
run: |
|
uses: actions/download-artifact@v4
|
||||||
pnpm --filter @ermnvldmr/jest-config build
|
with:
|
||||||
pnpm --filter @ermnvldmr/vite-config build
|
name: config-artifacts
|
||||||
pnpm --filter @ermnvldmr/storybook-config build
|
path: packages
|
||||||
pnpm --filter @ermnvldmr/stl build
|
- name: Lint STL package
|
||||||
pnpm --filter @ermnvldmr/ui build
|
run: pnpm --filter @ermnvldmr/stl lint
|
||||||
|
- name: Lint UI package
|
||||||
|
run: pnpm --filter @ermnvldmr/ui lint
|
||||||
|
- name: Lint WWW service
|
||||||
|
run: pnpm --filter @ermnvldmr/www lint
|
||||||
|
|
||||||
test-www:
|
typecheck-www:
|
||||||
name: Test - WWW & Deps
|
name: Typecheck - WWW & Deps
|
||||||
needs: build-dependencies
|
needs: build-configs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -89,22 +115,110 @@ jobs:
|
|||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
- name: Build dependencies
|
- name: Download Config Artifacts
|
||||||
run: |
|
uses: actions/download-artifact@v4
|
||||||
pnpm --filter @ermnvldmr/jest-config build
|
with:
|
||||||
pnpm --filter @ermnvldmr/vite-config build
|
name: config-artifacts
|
||||||
pnpm --filter @ermnvldmr/storybook-config build
|
path: packages
|
||||||
pnpm --filter @ermnvldmr/stl build
|
- name: Typecheck STL package
|
||||||
pnpm --filter @ermnvldmr/ui build
|
run: pnpm --filter @ermnvldmr/stl typecheck
|
||||||
- name: Run tests
|
- name: Typecheck UI package
|
||||||
run: |
|
run: pnpm --filter @ermnvldmr/ui typecheck
|
||||||
pnpm --filter @ermnvldmr/stl test:coverage
|
- name: Typecheck WWW service
|
||||||
pnpm --filter @ermnvldmr/ui test:coverage
|
run: pnpm --filter @ermnvldmr/www typecheck
|
||||||
pnpm --filter @ermnvldmr/www test:coverage
|
|
||||||
|
build-storybook:
|
||||||
|
name: Build - Storybook
|
||||||
|
needs: build-configs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 9.12.3
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: 'pnpm'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
- name: Download Config Artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: config-artifacts
|
||||||
|
path: packages
|
||||||
|
- name: Build WWW Storybook
|
||||||
|
run: pnpm --filter @ermnvldmr/www build-storybook
|
||||||
|
- name: Upload Storybook build
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: storybook-static
|
||||||
|
path: services/www/storybook-static/
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
test-www:
|
||||||
|
name: Test - Unit
|
||||||
|
needs: build-configs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 9.12.3
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: 'pnpm'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
- name: Download Config Artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: config-artifacts
|
||||||
|
path: packages
|
||||||
|
- name: Test STL package
|
||||||
|
run: pnpm --filter @ermnvldmr/stl test:coverage
|
||||||
|
- name: Test UI package
|
||||||
|
run: pnpm --filter @ermnvldmr/ui test:coverage
|
||||||
|
- name: Test WWW service
|
||||||
|
run: pnpm --filter @ermnvldmr/www test:coverage
|
||||||
|
|
||||||
|
test-storybook:
|
||||||
|
name: Test - Storybook
|
||||||
|
needs: build-storybook
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 9.12.3
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: 'pnpm'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
- name: Download Config Artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: config-artifacts
|
||||||
|
path: packages
|
||||||
|
- name: Install Playwright browsers
|
||||||
|
run: pnpm --filter @ermnvldmr/www exec playwright install --with-deps chromium
|
||||||
|
- name: Download Storybook build
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: storybook-static
|
||||||
|
path: services/www/storybook-static/
|
||||||
|
- name: Serve Storybook and run tests
|
||||||
|
run: pnpm --filter @ermnvldmr/www test:storybook:ci
|
||||||
|
|
||||||
build-www:
|
build-www:
|
||||||
name: Build - WWW Service
|
name: Build - WWW Service
|
||||||
needs: build-dependencies
|
needs: build-configs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -118,14 +232,13 @@ jobs:
|
|||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
- name: Download Config Artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: config-artifacts
|
||||||
|
path: packages
|
||||||
- name: Build WWW service
|
- name: Build WWW service
|
||||||
run: |
|
run: pnpm --filter @ermnvldmr/www build
|
||||||
pnpm --filter @ermnvldmr/jest-config build
|
|
||||||
pnpm --filter @ermnvldmr/vite-config build
|
|
||||||
pnpm --filter @ermnvldmr/storybook-config build
|
|
||||||
pnpm --filter @ermnvldmr/stl build
|
|
||||||
pnpm --filter @ermnvldmr/ui build
|
|
||||||
pnpm --filter @ermnvldmr/www build
|
|
||||||
|
|
||||||
release-rc-docker:
|
release-rc-docker:
|
||||||
name: Release - RC Docker Image
|
name: Release - RC Docker Image
|
||||||
|
|||||||
Generated
+18
@@ -421,12 +421,30 @@ importers:
|
|||||||
'@ermnvldmr/storybook-config':
|
'@ermnvldmr/storybook-config':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../packages/storybook-config
|
version: link:../../packages/storybook-config
|
||||||
|
'@storybook/addon-a11y':
|
||||||
|
specifier: ^8.6.15
|
||||||
|
version: 8.6.15(storybook@8.6.15(prettier@3.5.3))
|
||||||
|
'@storybook/addon-coverage':
|
||||||
|
specifier: ^3.0.0
|
||||||
|
version: 3.0.0(vite@7.3.1(@types/node@25.0.10)(jiti@2.6.1)(lightningcss@1.30.2))
|
||||||
|
'@storybook/addon-essentials':
|
||||||
|
specifier: ^8.6.15
|
||||||
|
version: 8.6.15(@types/react@19.2.9)(storybook@8.6.15(prettier@3.5.3))
|
||||||
|
'@storybook/addon-interactions':
|
||||||
|
specifier: ^8.6.15
|
||||||
|
version: 8.6.15(storybook@8.6.15(prettier@3.5.3))
|
||||||
|
'@storybook/addon-themes':
|
||||||
|
specifier: ^8.6.15
|
||||||
|
version: 8.6.15(storybook@8.6.15(prettier@3.5.3))
|
||||||
'@storybook/react':
|
'@storybook/react':
|
||||||
specifier: ^8.6.15
|
specifier: ^8.6.15
|
||||||
version: 8.6.15(@storybook/test@8.6.15(storybook@8.6.15(prettier@3.5.3)))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(storybook@8.6.15(prettier@3.5.3))(typescript@5.8.3)
|
version: 8.6.15(@storybook/test@8.6.15(storybook@8.6.15(prettier@3.5.3)))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(storybook@8.6.15(prettier@3.5.3))(typescript@5.8.3)
|
||||||
'@storybook/react-vite':
|
'@storybook/react-vite':
|
||||||
specifier: ^8.6.15
|
specifier: ^8.6.15
|
||||||
version: 8.6.15(@storybook/test@8.6.15(storybook@8.6.15(prettier@3.5.3)))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(rollup@4.56.0)(storybook@8.6.15(prettier@3.5.3))(typescript@5.8.3)(vite@7.3.1(@types/node@25.0.10)(jiti@2.6.1)(lightningcss@1.30.2))
|
version: 8.6.15(@storybook/test@8.6.15(storybook@8.6.15(prettier@3.5.3)))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(rollup@4.56.0)(storybook@8.6.15(prettier@3.5.3))(typescript@5.8.3)(vite@7.3.1(@types/node@25.0.10)(jiti@2.6.1)(lightningcss@1.30.2))
|
||||||
|
'@storybook/test':
|
||||||
|
specifier: ^8.6.15
|
||||||
|
version: 8.6.15(storybook@8.6.15(prettier@3.5.3))
|
||||||
'@storybook/test-runner':
|
'@storybook/test-runner':
|
||||||
specifier: ^0.19.1
|
specifier: ^0.19.1
|
||||||
version: 0.19.1(@swc/helpers@0.5.18)(@types/node@25.0.10)(storybook@8.6.15(prettier@3.5.3))(ts-node@10.9.2(@swc/core@1.15.10(@swc/helpers@0.5.18))(@types/node@25.0.10)(typescript@5.8.3))
|
version: 0.19.1(@swc/helpers@0.5.18)(@types/node@25.0.10)(storybook@8.6.15(prettier@3.5.3))(ts-node@10.9.2(@swc/core@1.15.10(@swc/helpers@0.5.18))(@types/node@25.0.10)(typescript@5.8.3))
|
||||||
|
|||||||
@@ -25,6 +25,16 @@ const config: StorybookConfig = {
|
|||||||
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
|
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
async viteFinal(config) {
|
||||||
|
config.resolve = config.resolve || {};
|
||||||
|
config.resolve.alias = {
|
||||||
|
...config.resolve.alias,
|
||||||
|
'#': path.resolve(__dirname, '../src'),
|
||||||
|
'@ermnvldmr/stl': path.resolve(__dirname, '../../../packages/stl/src'),
|
||||||
|
'@ermnvldmr/ui': path.resolve(__dirname, '../../../packages/ui/src'),
|
||||||
|
};
|
||||||
|
return config;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
@@ -40,8 +40,14 @@
|
|||||||
"@ermnvldmr/eslint-config": "workspace:*",
|
"@ermnvldmr/eslint-config": "workspace:*",
|
||||||
"@ermnvldmr/jest-config": "workspace:*",
|
"@ermnvldmr/jest-config": "workspace:*",
|
||||||
"@ermnvldmr/storybook-config": "workspace:*",
|
"@ermnvldmr/storybook-config": "workspace:*",
|
||||||
|
"@storybook/addon-a11y": "^8.6.15",
|
||||||
|
"@storybook/addon-coverage": "^3.0.0",
|
||||||
|
"@storybook/addon-essentials": "^8.6.15",
|
||||||
|
"@storybook/addon-interactions": "^8.6.15",
|
||||||
|
"@storybook/addon-themes": "^8.6.15",
|
||||||
"@storybook/react": "^8.6.15",
|
"@storybook/react": "^8.6.15",
|
||||||
"@storybook/react-vite": "^8.6.15",
|
"@storybook/react-vite": "^8.6.15",
|
||||||
|
"@storybook/test": "^8.6.15",
|
||||||
"@storybook/test-runner": "^0.19.1",
|
"@storybook/test-runner": "^0.19.1",
|
||||||
"@tailwindcss/vite": "^4.1.4",
|
"@tailwindcss/vite": "^4.1.4",
|
||||||
"@testing-library/jest-dom": "^6.9.1",
|
"@testing-library/jest-dom": "^6.9.1",
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import type { Meta, StoryObj } from '@storybook/react';
|
||||||
|
import { Welcome } from './Welcome';
|
||||||
|
|
||||||
|
const meta: Meta<typeof Welcome> = {
|
||||||
|
title: 'WWW/Widgets/Welcome',
|
||||||
|
component: Welcome,
|
||||||
|
tags: ['autodocs'],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default meta;
|
||||||
|
type Story = StoryObj<typeof Welcome>;
|
||||||
|
|
||||||
|
export const Default: Story = {};
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
export const Welcome: React.FC = () => {
|
||||||
|
return (
|
||||||
|
<div className="p-4 bg-gray-100 rounded-lg">
|
||||||
|
<h1 className="text-2xl font-bold">Welcome to WWW Service</h1>
|
||||||
|
<p>This is a placeholder component for Storybook.</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
Reference in new issue
Block a user