Skip to content

Commit

Permalink
revalidation-ete-tests (#1501)
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity authored Sep 19, 2024
1 parent 935fb87 commit b8e74f5
Show file tree
Hide file tree
Showing 85 changed files with 1,458 additions and 638 deletions.
19 changes: 13 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,7 @@ module.exports = {
allowDeclarations: true,
},
],
"@typescript-eslint/explicit-module-boundary-types": [
"error",
{
allowHigherOrderFunctions: false,
},
],
"@typescript-eslint/explicit-module-boundary-types": ["off"],
"@typescript-eslint/no-floating-promises": ["error"],
"@typescript-eslint/no-empty-function": [
"error",
Expand Down Expand Up @@ -113,6 +108,18 @@ module.exports = {
"@next/next/no-img-element": "off",
},
overrides: [
{
// enable the rule specifically for TypeScript files
files: ["*.ts", "*.mts", "*.cts", "*.tsx"],
rules: {
"@typescript-eslint/explicit-module-boundary-types": [
"error",
{
allowHigherOrderFunctions: false,
},
],
},
},
{
files: ["packages/fdr-sdk/**/*", "servers/fdr-deploy/**/*", "servers/fdr/**/*"],
rules: {
Expand Down
10 changes: 10 additions & 0 deletions .github/actions/ete-docs-bundle/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
token:
description: "The Vercel token to use for the deployment"
required: true
fern_token:
description: "The token to use for the Fern API"
required: true

runs:
using: "composite"
Expand All @@ -29,6 +32,13 @@ runs:
PLAYWRIGHT_JSON_OUTPUT_NAME: results.json
run: pnpm exec playwright test playwright/smoke --workers 6 --reporter json

- name: Run E2E tests
shell: bash
env:
DEPLOYMENT_URL: ${{ inputs.deployment_url }}
FERN_TOKEN: ${{ inputs.fern_token }}
run: pnpm i -g fern-api@latest; pnpm docs:e2e

- uses: daun/playwright-report-summary@v3
if: always()
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
uses: ./.github/actions/install

- name: Lint style
run: pnpm turbo lint:style
run: pnpm lint:style

- name: eslint
run: pnpm lint:eslint
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-docs-bundle-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,4 @@ jobs:
with:
deployment_url: ${{ needs.deploy.outputs.deployment_url }}
token: ${{ secrets.VERCEL_TOKEN }}
fern_token: ${{ secrets.FERN_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/deploy-docs-bundle-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
with:
deployment_url: ${{ needs.deploy_app_buildwithfern_com.outputs.deployment_url }}
token: ${{ secrets.VERCEL_TOKEN }}
fern_token: ${{ secrets.FERN_TOKEN }}

promote:
needs:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,9 @@ lerna-debug.log*

# script outputs
domains.txt
preview.txt
last-deploy.txt
deployment-url.txt

# next.js analysis
analyze
1 change: 0 additions & 1 deletion clis/vercel-scripts/last-deploy.txt

This file was deleted.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"compile": "turbo compile",
"build": "turbo build",
"depcheck": "turbo depcheck",
"lint": "lint:eslint && pnpm lint:style && pnpm format:check",
"lint": "pnpm lint:eslint && pnpm lint:style && pnpm format:check",
"lint:fix": "pnpm root-package:fix && pnpm lint:eslint:fix && pnpm lint:style:fix && pnpm format",
"lint:eslint": "turbo lint:eslint",
"lint:eslint:fix": "turbo lint:eslint:fix",
Expand All @@ -30,6 +30,7 @@
"docs:dev": "turbo docs:dev",
"docs:build": "turbo docs:build",
"docs:start": "turbo docs:start",
"docs:e2e": "vitest --run test/docs-e2e/**/* --globals",
"fdr:generate": "pnpm fern generate --api fdr --local && pnpm --filter=@fern-api/fdr-sdk compile",
"navigation:generate": "pnpm fern generate --api navigation --local"
},
Expand All @@ -39,9 +40,11 @@
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.24.1",
"@next/eslint-plugin-next": "14.2.9",
"@playwright/test": "^1.44.1",
"@playwright/test": "^1.47.1",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
"@types/express": "^4.17.13",
"@types/http-proxy": "^1.17.15",
"@types/is-ci": "^3.0.4",
"@types/lodash-es": "4.17.12",
"@types/node": "^18.7.18",
Expand All @@ -61,6 +64,8 @@
"eslint-plugin-tailwindcss": "^3.13.1",
"eslint-plugin-vitest": "^0.3.26",
"execa": "^5.1.1",
"express": "^4.18.1",
"http-proxy-middleware": "^3.0.2",
"husky": "^8.0.1",
"immer": "^9.0.15",
"is-ci": "^3.0.1",
Expand All @@ -69,6 +74,7 @@
"lint-staged": "^13.0.3",
"lodash-es": "^4.17.21",
"organize-imports-cli": "^0.10.0",
"playwright": "^1.47.1",
"prettier": "^3.3.2",
"react": "^18.2.0",
"styled-jsx": "^5.1.2",
Expand Down
20 changes: 3 additions & 17 deletions packages/ui/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,17 @@
"directory": "packages/ui/app"
},
"private": true,
"files": [
"dist"
],
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"exports": {
"./bundlers": {
"default": "./src/mdx/bundlers/index.ts"
},
"./auth": {
"default": "./src/auth/index.ts"
},
".": {
"default": "./src/index.ts"
}
"./bundlers": "./src/mdx/bundlers/index.ts",
"./auth": "./src/auth/index.ts",
".": "./src/index.ts"
},
"sideEffects": [
"*.css",
"*.scss"
],
"scripts": {
"clean": "rm -rf ./dist && tsc --build --clean",
"build": "tsc --build",
"test": "vitest --run --passWithNoTests --globals --disable-console-intercept",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore",
"lint:eslint:fix": "pnpm lint:eslint --fix",
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/app/src/css/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
@import "tailwindcss/utilities";
@import "./rmiz";
@import "./base";
@import "@fern-ui/components/src/index";
@import "@fern-ui/components/src/index.scss";
@import "@fern-ui/chatbot/src/index.scss";
@import "./components";
@import "../syntax-highlighting/FernSyntaxHighlighter";
@import "../api-reference";
Expand All @@ -15,4 +16,3 @@
@import "../themes";
@import "../header";
@import "../sidebar";
@import "@fern-ui/chatbot/src/index";
5 changes: 4 additions & 1 deletion packages/ui/chatbot/.depcheckrc.json
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{ "ignores": ["@fern-platform/configs", "@types/node", "vite", "@types/react"], "ignore-patterns": ["dist"] }
{
"ignores": ["@fern-platform/configs", "@types/node", "vite", "@types/react", "typescript"],
"ignore-patterns": ["dist"]
}
13 changes: 6 additions & 7 deletions packages/ui/chatbot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@
"url": "git+https://github.com/fern-api/fern-platform.git",
"directory": "packages/ui/chatbot"
},
"type": "module",
"exports": {
".": "./src/index.ts",
"./src/index.scss": "./src/index.scss"
},
"files": [
"dist"
"src"
],
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"sideEffects": [
"*.css",
"*.scss"
],
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
"compile": "tsc --build",
"test": "vitest --run --passWithNoTests --globals",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore",
"lint:eslint:fix": "pnpm lint:eslint --fix",
Expand Down
1 change: 0 additions & 1 deletion packages/ui/chatbot/src/App.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
@import "@fern-ui/components/src/FernScrollArea";
@import "@radix-ui/colors/gray";
@import "@radix-ui/colors/gray-dark";
@import "@radix-ui/colors/gray-alpha";
Expand Down
15 changes: 7 additions & 8 deletions packages/ui/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,20 @@
"directory": "packages/components"
},
"private": true,
"files": [
"dist"
],
"type": "module",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"types": "src/index.ts",
"exports": {
".": "./src/index.ts",
"./src/index.scss": "./src/index.scss"
},
"sideEffects": [
"*.css",
"*.scss"
],
"files": [
"src"
],
"scripts": {
"test": "vitest --run --passWithNoTests --globals --disable-console-intercept",
"compile": "tsc --build",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore",
"lint:eslint:fix": "pnpm lint:eslint --fix",
"lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0",
Expand Down
Loading

0 comments on commit b8e74f5

Please sign in to comment.