diff --git a/.github/workflows/ci-validate-platforms.yml b/.github/workflows/ci-validate-platforms.yml index f8863241d60..7907cfd5f09 100644 --- a/.github/workflows/ci-validate-platforms.yml +++ b/.github/workflows/ci-validate-platforms.yml @@ -1,4 +1,4 @@ -name: Validate Platforms/Browsers +name: Validate PRs On All Platforms/Browsers on: workflow_dispatch: diff --git a/.github/workflows/ci-validate-pr.yml b/.github/workflows/ci-validate-pr.yml index 124de354dec..364841bf90c 100644 --- a/.github/workflows/ci-validate-pr.yml +++ b/.github/workflows/ci-validate-pr.yml @@ -1,4 +1,4 @@ -name: Validate PRs +name: Validate PRs on Chromium on: workflow_dispatch: @@ -56,7 +56,7 @@ jobs: npx playwright install --with-deps - name: Testing unit tests - run: npm run test + run: npm run test:chromium - name: Testing final validation run: npm run test:validation diff --git a/change/@microsoft-fast-element-a13a2674-cd3b-4f08-b1b3-2b6d33e9d581.json b/change/@microsoft-fast-element-a13a2674-cd3b-4f08-b1b3-2b6d33e9d581.json new file mode 100644 index 00000000000..b1d4190fcbc --- /dev/null +++ b/change/@microsoft-fast-element-a13a2674-cd3b-4f08-b1b3-2b6d33e9d581.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Split tests to assist in base PR build gate times", + "packageName": "@microsoft/fast-element", + "email": "7559015+janechu@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/change/@microsoft-fast-html-46be649c-4373-47fb-b68f-ef6428174490.json b/change/@microsoft-fast-html-46be649c-4373-47fb-b68f-ef6428174490.json new file mode 100644 index 00000000000..7a83633f7c9 --- /dev/null +++ b/change/@microsoft-fast-html-46be649c-4373-47fb-b68f-ef6428174490.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Split tests to assist in base PR build gate times", + "packageName": "@microsoft/fast-html", + "email": "7559015+janechu@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/change/@microsoft-fast-router-f09e0d07-7742-490e-8cfd-69130c4f3e3c.json b/change/@microsoft-fast-router-f09e0d07-7742-490e-8cfd-69130c4f3e3c.json new file mode 100644 index 00000000000..55de474b295 --- /dev/null +++ b/change/@microsoft-fast-router-f09e0d07-7742-490e-8cfd-69130c4f3e3c.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Split tests to assist in base PR build gate times", + "packageName": "@microsoft/fast-router", + "email": "7559015+janechu@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/change/@microsoft-fast-ssr-bbc894e1-91f1-47b9-ad60-cd80a8ba5579.json b/change/@microsoft-fast-ssr-bbc894e1-91f1-47b9-ad60-cd80a8ba5579.json new file mode 100644 index 00000000000..a5dd8eff9df --- /dev/null +++ b/change/@microsoft-fast-ssr-bbc894e1-91f1-47b9-ad60-cd80a8ba5579.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Split tests to assist in base PR build gate times", + "packageName": "@microsoft/fast-ssr", + "email": "7559015+janechu@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/package.json b/package.json index 64b55c5f373..52123e90d8a 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,8 @@ "test:diff:error": "echo \"Untracked files exist, try running npm prepare to identify the culprit.\" && exit 1", "test:diff": "git update-index --refresh && git diff-index --quiet HEAD -- || npm run test:diff:error", "test:validation": "npm run test:diff", - "test": "npm run test --workspaces --if-present", + "test": "npm run test:node -ws --if-present && npm run test:playwright -ws --if-present -- --project=*", + "test:chromium": "npm run test:node -ws --if-present && npm run test:playwright -ws --if-present -- --project=chromium", "watch": "tsc -p ./tsconfig.json -w --preserveWatchOutput", "format:check": "npx prettier . --check", "format": "npx prettier . --write" diff --git a/packages/fast-html/playwright.config.ts b/packages/fast-html/playwright.config.ts index 3328388a589..915d6fab715 100644 --- a/packages/fast-html/playwright.config.ts +++ b/packages/fast-html/playwright.config.ts @@ -5,9 +5,18 @@ export default defineConfig({ testMatch: "**/*.spec.ts", retries: 3, projects: [ - { name: "chromium", use: { ...devices["Desktop Chrome"] } }, - { name: "firefox", use: { ...devices["Desktop Firefox"] } }, - { name: "webkit", use: { ...devices["Desktop Safari"] } }, + { + name: "chromium", + use: { ...devices["Desktop Chrome"] }, + }, + { + name: "firefox", + use: { ...devices["Desktop Firefox"] }, + }, + { + name: "webkit", + use: { ...devices["Desktop Safari"] }, + }, ], webServer: { command: "npm run test-server", diff --git a/packages/fast-router/package.json b/packages/fast-router/package.json index e2771eac46b..375f33ba18a 100644 --- a/packages/fast-router/package.json +++ b/packages/fast-router/package.json @@ -32,7 +32,7 @@ "prettier:diff": "prettier --config ../../.prettierrc \"**/*.ts\" --list-different", "eslint": "eslint . --ext .ts", "eslint:fix": "eslint . --ext .ts --fix", - "test:recognizer": "tsc -p ./tsconfig.json && node --test dist/esm/recognizer.spec.js", + "test:node": "tsc -p ./tsconfig.json && node --test dist/esm/recognizer.spec.js", "test": "npm run eslint && npm run doc:ci && npm run test:recognizer" }, "dependencies": { diff --git a/packages/fast-ssr/package.json b/packages/fast-ssr/package.json index 7363a251266..83cfb5f0654 100644 --- a/packages/fast-ssr/package.json +++ b/packages/fast-ssr/package.json @@ -30,7 +30,7 @@ "prettier": "prettier --config ../../.prettierrc --write \"**/*.{ts,html}\"", "test": "npm run test:node && npm run test:playwright", "test:node": "node scripts/run-tests.mjs", - "test:playwright": "playwright test", + "test:playwright": "npm run pretest && playwright test", "test-server": "node server/dist/server.js" }, "description": "A package for rendering FAST Web Components outside the browser.",