-
-
Notifications
You must be signed in to change notification settings - Fork 134
chore: make the development process easier with Storybook #541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
adguernier
merged 68 commits into
api-platform:main
from
marmelab:chore/add-jwt-backend-and-stories
May 6, 2024
Merged
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
6d267e8
chore: add auth storie and test
adguernier c288451
fix: Auth test did not use correct endpoint
adguernier 0360d52
fix: TS warning
adguernier 93f6641
fix: use env for storybook tests
adguernier bdeaee8
CI: run interaction test in CI
adguernier 76e4c20
fix: NODE_ENV does not exist and expect is declared but its value is …
adguernier bb524d8
fix: expect is declared but its value is never read in check build
adguernier 3346b0b
fix: unexpected any in checking code standards
adguernier c37676c
fix: remove useless test
adguernier 95cb317
fix: check PWA reachability fails
adguernier 3f2b8dd
fix: try to fix check PWA reachability fails
adguernier e15b7d4
fix: uncomment reachability steps
adguernier 81fd9aa
fix: try to fix reachability steps
adguernier 500ce1f
fix: try to fix reachability steps by healthchecking pwa
adguernier 9087b62
fix: try to fix Timeout error in interactions tests by setting maxWor…
adguernier 037241a
fix: try to fix Timeout error in interactions tests by setting maxWor…
adguernier e48682a
fix: try to fix Timeout error in interactions tests by setting maxWor…
adguernier 4b7f486
fix: try to fix Timeout error in interactions tests by adding timeout…
adguernier 140834e
chore: remove useless type
adguernier b71151e
chore: add @types/node to fix Failed to parse the TypeScript config f…
adguernier 083c018
chore: try to fix test by setting a hight testTimeout
adguernier 474eacc
chore: try to fix test by waiting for page ready
adguernier 5c1ec91
chore: try to fix test by waiting for page ready
adguernier a04727d
chore: try to fix test
adguernier 9e2b476
chore: upgrade storybook to version 8
adguernier 16f7c45
chore: try to get playwright artifact
adguernier 1e267f4
chore: try to fix storybook tests
adguernier dade8fb
chore: retry to build and bake
adguernier f7fda1a
chore: compose up without build
adguernier 45acfa7
chore: add yarn install to CMD
adguernier e487570
chore: update yarn.lock
adguernier d4eacbb
switch back to nodeLinker node-modules
slax57 9573e03
update gitignore to ignore storybook build result
slax57 48710b7
re-enable playwright install
slax57 77804a4
disable reverse_proxy
slax57 39025f5
re-enable reverse proxy and fix its config
slax57 bfca4e5
re-enable reachability checks
slax57 5befd5b
re-remove reverse proxy
slax57 6405534
attempt to fix yarn playwright install
slax57 acd11d2
check health more frquently and output logs in case of failure
slax57 23e0760
Merge branch 'main' into chore/add-jwt-backend-and-stories
slax57 7528365
fix merge mistake
slax57 e781ebe
try to fix yarn settings
slax57 92e168e
improve debug logs
slax57 d9bfd83
remove broken checks and fix volumes config
slax57 4f03e4b
fix node_modules volume should only be declared for ci
slax57 8e347fc
fix runtime error in hydra dataProvider
slax57 9fe98e2
update CONTRIBUTING
adguernier 9fc1471
install Twig to make API doc working
adguernier c2d4a16
fix: use params instead of defaultParams in extraInformation
adguernier 5d70a2a
chore: clean yarn cache after modules installation
adguernier 5ae05bb
chore: explain how to develop through Storybook
adguernier e1370ff
chore: clean yarn cache in CI
adguernier d7de715
chore: try to fix docker file linter in CI
adguernier 0c7f0d0
chore: try to fix docker file linter in CI by ignoring DL3060 rule
adguernier e3eeedc
chore: try to fix docker file linter in CI by ignoring DL3060 rule
adguernier 02cde2e
chore: try to fix docker linter in CI
adguernier 73e279d
chore: remove useless actions
adguernier 8917e12
chore: add Storybook documentation
adguernier 70e90a6
chore: re-add buildx and bake action
adguernier f91c2a6
chore: add compose.ci.yaml to bake-action
adguernier cc10da7
chore: fix typos from review
adguernier bcc81b3
Apply suggestions from code review
adguernier eb3d456
remove useless php packages
adguernier cf539af
fix: ignore cert errors
alanpoulain a376ec9
chore: update contributing to explain how to run tests
adguernier 64e0a1b
chore: remove comment in cache.yaml
adguernier be380d5
chore: isntall playwright for all images
adguernier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ node_modules/ | |
/yarn.lock | ||
.vscode/ | ||
.env.local | ||
.yarn/ | ||
storybook-static/ | ||
.cache/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { getJestConfig } from '@storybook/test-runner'; | ||
|
||
/** | ||
* Jest configuration for running tests in Storybook. | ||
*/ | ||
module.exports = { | ||
// The default Jest configuration comes from @storybook/test | ||
...getJestConfig(), | ||
|
||
/** | ||
* Add your own overrides below, and make sure | ||
* to merge testRunnerConfig properties with your own. | ||
* @see https://jestjs.io/docs/configuration | ||
*/ | ||
testTimeout: 30000, | ||
testEnvironmentOptions: { | ||
'jest-playwright': { | ||
launchOptions: { | ||
args: ['--ignore-certificate-errors'] | ||
} | ||
} | ||
} | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,38 +2,37 @@ | |
|
||
|
||
# Versions | ||
FROM node:20-alpine AS node_upstream | ||
FROM node:20-bookworm AS node_upstream | ||
|
||
|
||
# Base stage for dev and build | ||
FROM node_upstream AS base | ||
|
||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | ||
# hadolint ignore=DL3018 | ||
RUN apk add --no-cache libc6-compat | ||
|
||
WORKDIR /srv/app | ||
|
||
RUN corepack enable && \ | ||
corepack prepare --activate yarn@* | ||
|
||
ENV HOSTNAME localhost | ||
EXPOSE 3000 | ||
ENV PORT 3000 | ||
ENV HOSTNAME localhost | ||
|
||
# Development image | ||
FROM base as dev | ||
|
||
CMD ["sh", "-c", "yarn install; yarn storybook"] | ||
|
||
FROM base as ci | ||
COPY --link package.json yarn.lock .yarnrc.yml ./ | ||
|
||
COPY --link package.json yarn.lock ./ | ||
RUN set -eux; \ | ||
yarn | ||
yarn && yarn cache clean | ||
|
||
# copy sources | ||
COPY --link . ./ | ||
RUN yarn storybook:build | ||
|
||
CMD ["yarn", "serve"] | ||
RUN set -eux; \ | ||
yarn playwright install --with-deps && yarn cache clean | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we install this on the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
||
# Development image | ||
FROM base as dev | ||
|
||
CMD ["sh", "-c", "yarn storybook"] | ||
|
||
FROM base as ci | ||
|
||
CMD ["sh", "-c", "yarn storybook:build && yarn storybook:serve -p 3000"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.