Skip to content
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

chore: upgrade playwright and storybook #192

Merged
merged 11 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,8 @@ runs:

- name: Install dependencies
shell: bash
run: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 pnpm i
run: pnpm i

- name: Cache playwright binaries
uses: actions/cache@v3
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Install Playwright browsers
run: pnpm --filter "@custom-tests/e2e" download-browsers
- name: Check formatting
shell: bash
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm test:format
2 changes: 0 additions & 2 deletions .lagoon/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=node /usr/local/bin/node /usr/local/bin/node
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm

ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1

# Install pnpm
RUN npm install -g [email protected] && pnpm config set store-dir /tmp/cache/pnpm

Expand Down
2 changes: 1 addition & 1 deletion apps/cms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"drush": "SB_ENVIRONMENT=1 SIMPLETEST_DB=sqlite://localhost/sites/default/files/.sqlite DRUSH_OPTIONS_URI=http://127.0.0.1:8888 vendor/bin/drush",
"silverback": "SB_ENVIRONMENT=1 SIMPLETEST_DB=sqlite://localhost/sites/default/files/.sqlite SB_ADMIN_USER=admin SB_ADMIN_PASS=admin vendor/bin/silverback",
"drupal-install": "SB_SETUP=1 pnpm silverback setup --profile minimal && pnpm content:import && pnpm drush php-eval 'node_access_rebuild();' && rm -rf install-cache.zip && pnpm fix-premissions && pnpm ensure-working-db",
"export-webforms": "pnpm run --filter '@custom-tests/e2e' download-browsers && pnpm run --filter '@custom-tests/e2e' webform-snapshots",
"export-webforms": "pnpm turbo --filter '@custom-tests/e2e' webform-snapshots",
"start": "cd web; SB_ENVIRONMENT=1 SIMPLETEST_DB=sqlite://localhost/sites/default/files/.sqlite DRUSH_OPTIONS_URI=http://127.0.0.1:8888 php -S 0.0.0.0:8888 .ht.router.php # no drush to avoid the drush server timeout",
"dev": "pnpm start",
"clear": "pnpm drush cr",
Expand Down
8 changes: 2 additions & 6 deletions packages/ui/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { StorybookConfig } from '@storybook/react-vite';
import pluginTurbosnap from 'vite-plugin-turbosnap';
import { mergeConfig, UserConfig } from 'vite';
import { imagetools } from 'vite-imagetools';
import { resolve, dirname } from 'path';
Expand All @@ -19,13 +18,10 @@ const config: StorybookConfig = {
),
},
},
plugins: [
pluginTurbosnap({ rootDir: config.root ?? process.cwd() }),
imagetools(),
],
plugins: [imagetools()],
} satisfies UserConfig),
staticDirs: ['../static/public', '../static/stories'],
stories: ['../src/**/*.stories.@(ts|tsx|mdx)'],
stories: ['../src/**/*.@(mdx|stories.@(ts|tsx))'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
Expand Down
27 changes: 12 additions & 15 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"prep:iframe": "NODE_ENV=production pnpm postcss src/iframe.css -o build/iframe.css",
"prep:gutenberg": "NODE_ENV=production PREFIX=gutenberg pnpm postcss src/tailwind.css -o build/gutenberg.css",
"prep:i18n": "formatjs extract 'src/**/*.ts*' --ignore='**/*.d.ts' --ignore='**/*.stories.ts*' --out-file build/translatables.json --id-interpolation-pattern '[sha512:contenthash:base64:6]'\n",
"build": "storybook build",
"build": "storybook build --stats-json",
"dev": "storybook dev -p 6006 --no-open",
"start": "serve storybook-static -p 6006 > /dev/null 2>&1",
"test:static": "tsc --noEmit && eslint \"**/*.{ts,tsx,js,jsx}\" --ignore-path=\"./.eslintignore\"",
Expand Down Expand Up @@ -63,23 +63,21 @@
"@amazeelabs/bridge-storybook": "^1.2.8",
"@amazeelabs/cloudinary-responsive-image": "^1.6.15",
"@formatjs/cli": "^6.2.4",
"@storybook/addon-a11y": "7.6.19",
"@storybook/addon-actions": "^7.6.7",
"@storybook/addon-coverage": "^1.0.0",
"@storybook/addon-essentials": "^7.6.7",
"@storybook/addon-interactions": "^7.6.7",
"@storybook/addon-links": "^7.6.7",
"@storybook/blocks": "^7.6.7",
"@storybook/react": "^7.6.7",
"@storybook/react-vite": "^7.6.7",
"@storybook/test": "8.0.0-alpha.14",
"@storybook/test-runner": "^0.16.0",
"@storybook/addon-actions": "^8.1.6",
"@storybook/addon-coverage": "^1.0.4",
"@storybook/addon-essentials": "^8.1.6",
"@storybook/addon-interactions": "^8.1.6",
"@storybook/addon-links": "^8.0.8",
"@storybook/blocks": "^8.1.6",
"@storybook/react": "^8.1.6",
"@storybook/react-vite": "^8.1.6",
"@storybook/test": "8.1.6",
"@storybook/test-runner": "^0.18.2",
"@swc/cli": "^0.1.63",
"@swc/core": "^1.3.102",
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
"@testing-library/react": "^14.1.2",
"@types/hast": "^2.3.9",
"@types/react": "^18.2.46",
"@types/react-body-classname": "^1.1.10",
Expand All @@ -102,12 +100,11 @@
"react-dom": "^18.2.0",
"serve": "^14.2.1",
"start-server-and-test": "^2.0.3",
"storybook": "^7.6.7",
"storybook": "^8.1.6",
"tailwindcss": "^3.4.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-imagetools": "^6.2.9",
"vite-plugin-turbosnap": "^1.0.3",
"vitest": "^1.1.1"
}
}
Loading
Loading