From 6f5087db7cf038121f3280bc8020e4ed11ffc904 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 29 Aug 2024 16:17:02 +0200 Subject: [PATCH] ignore DocSearch classes in test CSS order + move CI test from netlify to GitHub Action job --- .github/workflows/tests.yml | 2 ++ website/package.json | 6 +++--- website/testCSSOrder.mjs | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e885e8849fec..f25550544199 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,6 +44,8 @@ jobs: run: yarn workspace @docusaurus/theme-common removeThemeInternalReexport - name: Docusaurus Build run: yarn build:website:fast + - name: Docusaurus site CSS order + run: yarn workspace website test:css-order - name: TypeCheck website run: yarn workspace website typecheck diff --git a/website/package.json b/website/package.json index 0473d0a7483c..d5ce9aca8359 100644 --- a/website/package.json +++ b/website/package.json @@ -24,9 +24,9 @@ "build:fast": "cross-env BUILD_FAST=true yarn build --locale en", "build:fast:rsdoctor": "cross-env BUILD_FAST=true RSDOCTOR=true yarn build --locale en", "build:fast:profile": "cross-env BUILD_FAST=true node --cpu-prof --cpu-prof-dir .cpu-prof ./node_modules/.bin/docusaurus build --locale en", - "netlify:build:production": "yarn docusaurus write-translations && yarn netlify:crowdin:delay && yarn netlify:crowdin:uploadSources && yarn netlify:crowdin:downloadTranslations && yarn build && yarn test:css-order", - "netlify:build:branchDeploy": "yarn build && yarn test:css-order", - "netlify:build:deployPreview": "yarn build && yarn test:css-order", + "netlify:build:production": "yarn docusaurus write-translations && yarn netlify:crowdin:delay && yarn netlify:crowdin:uploadSources && yarn netlify:crowdin:downloadTranslations && yarn build", + "netlify:build:branchDeploy": "yarn build", + "netlify:build:deployPreview": "yarn build", "netlify:crowdin:delay": "node delayCrowdin.mjs", "netlify:crowdin:wait": "node waitForCrowdin.mjs", "netlify:crowdin:downloadTranslations": "yarn netlify:crowdin:wait && yarn --cwd .. crowdin:download:website", diff --git a/website/testCSSOrder.mjs b/website/testCSSOrder.mjs index aaa9b5b4bb88..fbb3bf2fc27a 100644 --- a/website/testCSSOrder.mjs +++ b/website/testCSSOrder.mjs @@ -47,8 +47,10 @@ const EXPECTED_CSS_MARKERS = [ '.test-marker-site-index-page', // Lazy-loaded lib - '.DocSearch-Modal', - '.DocSearch-Hit-content-wrapper', + // Looks like order changed during Webpack 5: https://github.com/facebook/docusaurus/pull/10455 + // Note a big deal though + // '.DocSearch-Modal', + // '.DocSearch-Hit-content-wrapper', ]; const cssDirName = fileURLToPath(new URL('build/assets/css', import.meta.url));