Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/kasper/fix-sandboxes-next' into …
Browse files Browse the repository at this point in the history
…unified-ui-testing
  • Loading branch information
valentinpalkovic committed Oct 23, 2024
2 parents 7460021 + d9972f7 commit f30996d
Show file tree
Hide file tree
Showing 13 changed files with 160 additions and 184 deletions.
112 changes: 56 additions & 56 deletions .github/workflows/generate-sandboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ on:
workflow_dispatch:
# To test fixes on push rather than wait for the scheduling, do the following:
# 1. Uncomment the lines below and add your branch.
# push:
# branches:
# - <your-branch-name>
push:
branches:
- kasper/fix-sandboxes-next
# 2. Change the "ref" value to <your-branch-name> in the actions/checkout step below.
# 3. Comment out the whole "generate-main" job starting at line 77
# 4. 👉 DON'T FORGET TO UNDO THE STEPS BEFORE YOU MERGE YOUR CHANGES!
Expand All @@ -28,8 +28,8 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: next
ref: kasper/fix-sandboxes-next

- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
Expand Down Expand Up @@ -74,54 +74,54 @@ jobs:
The generation of some or all sandboxes on the **next** branch has failed.
[See the job summary for details](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
generate-main:
name: Generate to main
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main

- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- name: Setup git user
run: |
git config --global user.name "storybook-bot"
git config --global user.email "32066757+storybook-bot@users.noreply.github.com"
- name: Install dependencies
working-directory: ./scripts
run: node --experimental-modules ./check-dependencies.js

- name: Compile Storybook libraries
run: yarn task --task compile --start-from=auto --no-link

- name: Publish to local registry
run: yarn local-registry --publish

- name: Run local registry
run: yarn local-registry --open &

- name: Wait for registry
run: yarn wait-on tcp:127.0.0.1:6001

- name: Generate
id: generate
run: yarn generate-sandboxes --local-registry

- name: Publish
# publish sandboxes even if the generation fails, as some sandboxes might have been generated successfully
if: ${{ !cancelled() }}
run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT }}@github.com/storybookjs/sandboxes.git --push --branch=main

- name: Report failure to Discord
if: failure()
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }}
uses: Ilshidur/action-discord@master
with:
args: |
The generation of some or all sandboxes on the **main** branch has failed.
[See the job summary for details](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
# generate-main:
# name: Generate to main
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# ref: main
#
# - uses: actions/setup-node@v4
# with:
# node-version-file: ".nvmrc"
#
# - name: Setup git user
# run: |
# git config --global user.name "storybook-bot"
# git config --global user.email "32066757+storybook-bot@users.noreply.github.com"
#
# - name: Install dependencies
# working-directory: ./scripts
# run: node --experimental-modules ./check-dependencies.js
#
# - name: Compile Storybook libraries
# run: yarn task --task compile --start-from=auto --no-link
#
# - name: Publish to local registry
# run: yarn local-registry --publish
#
# - name: Run local registry
# run: yarn local-registry --open &
#
# - name: Wait for registry
# run: yarn wait-on tcp:127.0.0.1:6001
#
# - name: Generate
# id: generate
# run: yarn generate-sandboxes --local-registry
#
# - name: Publish
# # publish sandboxes even if the generation fails, as some sandboxes might have been generated successfully
# if: ${{ !cancelled() }}
# run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT }}@github.com/storybookjs/sandboxes.git --push --branch=main
#
# - name: Report failure to Discord
# if: failure()
# env:
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }}
# uses: Ilshidur/action-discord@master
# with:
# args: |
# The generation of some or all sandboxes on the **main** branch has failed.
# [See the job summary for details](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const meta: Meta<WithPipeComponent> = {
declarations: [CustomPipePipe],
}),
],
tags: ['!test', '!vitest'],
parameters: { chromatic: { disable: true } },
};

export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const meta: Meta<ChipComponent> = {
imports: [ChipsModule],
}),
],
tags: ['!test', '!vitest'],
parameters: { chromatic: { disable: true } },
};

export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const meta: Meta<ChipsGroupComponent> = {
removeChipClick: { action: 'Remove chip' },
removeAllChipsClick: { action: 'Remove all chips clicked' },
},
tags: ['!test', '!vitest'],
parameters: { chromatic: { disable: true } },
};

export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const meta: Meta<ChipsGroupComponent> = {
imports: [ChipsModule],
}),
],
tags: ['!test', '!vitest'],
parameters: { chromatic: { disable: true } },
};

export default meta;
Expand Down
8 changes: 4 additions & 4 deletions code/frameworks/svelte-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@
"ts-dedent": "^2.2.0"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@types/node": "^22.0.0",
"svelte": "^5.0.0-next.268",
"svelte": "^5.0.5",
"typescript": "^5.3.2",
"vite": "^4.0.0"
},
"peerDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.0.0 || ^3.0.0",
"@sveltejs/vite-plugin-svelte": "^2.0.0 || ^3.0.0 || ^4.0.0",
"storybook": "workspace:^",
"svelte": "^4.0.0 || ^5.0.0-next.65",
"svelte": "^4.0.0 || ^5.0.0",
"vite": "^4.0.0 || ^5.0.0"
},
"engines": {
Expand Down
6 changes: 3 additions & 3 deletions code/frameworks/svelte-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
"@storybook/svelte": "workspace:*"
},
"devDependencies": {
"svelte": "^4.0.0",
"svelte-loader": "^3.1.9",
"svelte": "^5.0.5",
"svelte-loader": "^3.2.4",
"typescript": "^5.3.2"
},
"peerDependencies": {
"storybook": "workspace:^",
"svelte": "^4.0.0 || ^5.0.0-next.65",
"svelte": "^4.0.0 || ^5.0.0",
"svelte-loader": "*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
},
"peerDependencies": {
"storybook": "workspace:^",
"svelte": "^4.0.0 || ^5.0.0-next.65",
"svelte": "^4.0.0 || ^5.0.0",
"vite": "^4.0.0 || ^5.0.0"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions code/lib/cli-storybook/src/sandbox-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const baseTemplates = {
'nextjs/default-js': {
name: 'Next.js Latest (Webpack | JavaScript)',
script:
'yarn create next-app {{beforeDir}} --javascript --eslint --tailwind --app --import-alias="@/*" --src-dir',
'yarn create next-app {{beforeDir}} -e https://github.com/vercel/next.js/tree/next-14-1/examples/hello-world && cd {{beforeDir}} && npm pkg set "dependencies.next"="^14.2.16" && yarn && git add . && git commit --amend --no-edit && cd ..',
expected: {
framework: '@storybook/nextjs',
renderer: '@storybook/react',
Expand All @@ -176,7 +176,7 @@ const baseTemplates = {
'nextjs/default-ts': {
name: 'Next.js Latest (Webpack | TypeScript)',
script:
'yarn create next-app {{beforeDir}} --typescript --eslint --tailwind --app --import-alias="@/*" --src-dir',
'yarn create next-app {{beforeDir}} -e https://github.com/vercel/next.js/tree/next-14-1/examples/hello-world && cd {{beforeDir}} && npm pkg set "dependencies.next"="^14.2.16" && yarn && git add . && git commit --amend --no-edit && cd ..',
expected: {
framework: '@storybook/nextjs',
renderer: '@storybook/react',
Expand Down
6 changes: 3 additions & 3 deletions code/presets/svelte-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"svelte": "^4.0.0",
"svelte-loader": "^3.1.9",
"svelte": "^5.0.0",
"svelte-loader": "^3.2.4",
"typescript": "^5.3.2"
},
"peerDependencies": {
"storybook": "workspace:^",
"svelte": "^4.0.0 || ^5.0.0-next.65",
"svelte": "^4.0.0 || ^5.0.0",
"svelte-loader": "*"
},
"engines": {
Expand Down
8 changes: 4 additions & 4 deletions code/renderers/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@
"type-fest": "~2.19"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.0.2",
"@testing-library/svelte": "^5.2.3",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@testing-library/svelte": "^5.2.4",
"expect-type": "^0.15.0",
"svelte": "^5.0.0-next.268",
"svelte": "^5.0.5",
"svelte-check": "^4.0.5",
"typescript": "^5.3.2"
},
"peerDependencies": {
"storybook": "workspace:^",
"svelte": "^4.0.0 || ^5.0.0-next.65"
"svelte": "^4.0.0 || ^5.0.0"
},
"engines": {
"node": ">=18.0.0"
Expand Down
Loading

0 comments on commit f30996d

Please sign in to comment.