diff --git a/.github/actions/install-playwright/action.yml b/.github/actions/install-playwright/action.yml new file mode 100644 index 000000000..8f3d7bef1 --- /dev/null +++ b/.github/actions/install-playwright/action.yml @@ -0,0 +1,76 @@ +name: Install Playwright +description: Install Playwright and dependencies with cache + +# https://github.com/microsoft/playwright/issues/7249 + +inputs: + working-directory: + description: Where to install Playwright + default: ./ + browsers: + description: Browsers to install + default: chromium webkit firefox + +outputs: + version: + description: Installed version of Playwright + value: ${{ steps.version.outputs.version }} + cache-hit: + description: Whether cache for Playwright was found + value: ${{ steps.cache.outputs.cache-hit }} + +runs: + using: composite + steps: + - name: Get Playwright version + uses: actions/github-script@v7 + id: version + with: + script: | + const fs = require('fs'); + const path = require('path'); + + // Get working directory + const workingDirectory = "${{ inputs.working-directory }}"; + console.debug("Specified working directory:", workingDirectory); + if (workingDirectory) process.chdir(workingDirectory); + console.debug("Actual working directory:", process.cwd()); + + // Read package.json + let version = ""; + try { + const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8')); + version = ( + packageJson.devDependencies?.['@playwright/test'] || + packageJson.dependencies?.['@playwright/test'] || + packageJson.dependencies?.['playwright'] || + packageJson.devDependencies?.['playwright'] + )?.replace(/[\^~]/g, ''); + } catch (error) { + console.log(error.message); + } + + console.debug("Version:", version); + if (version) { + core.exportVariable("PLAYWRIGHT_VERSION", version); + core.setOutput("version", version); + } else core.setFailed("Couldn't get Playwright version"); + + - name: Cache Playwright + id: cache + uses: actions/cache@v4 + with: + path: ~/.cache/ms-playwright + key: playwright-${{ env.PLAYWRIGHT_VERSION }} + + - name: Install Playwright and its dependencies + shell: bash + if: steps.cache.outputs.cache-hit != 'true' + working-directory: ${{ inputs.working-directory }} + run: npx playwright install ${{ inputs.browsers }} --with-deps + + - name: Install just Playwright's dependencies + shell: bash + if: steps.cache.outputs.cache-hit == 'true' + working-directory: ${{ inputs.working-directory }} + run: npx playwright install-deps diff --git a/.github/workflows/python_test.yml b/.github/workflows/python_test.yml index e7ee2ec20..714ca32d9 100644 --- a/.github/workflows/python_test.yml +++ b/.github/workflows/python_test.yml @@ -33,6 +33,8 @@ jobs: build: name: Unit Tests - Python ${{ matrix.python-version }} - Group ${{ matrix.group }} runs-on: ubuntu-latest + env: + UV_CACHE_DIR: /tmp/.uv-cache strategy: matrix: python-version: ${{ fromJson(inputs.python-versions || '["3.10", "3.11", "3.12"]' ) }} diff --git a/.github/workflows/typescript_test.yml b/.github/workflows/typescript_test.yml index 9ce03ca6c..daa9016f4 100644 --- a/.github/workflows/typescript_test.yml +++ b/.github/workflows/typescript_test.yml @@ -12,7 +12,7 @@ on: description: "Test suites to run (JSON array)" required: false type: string - default: '["starter-projects", "components", "workspace", "api", "database"]' + default: '[]' release: description: "Whether this is a release build" required: false @@ -81,7 +81,7 @@ jobs: RELEASE="${{ inputs.release || 'false' }}" echo "Release build: $RELEASE" - if [[ "$RELEASE" == "true" || "$SUITES" == "[]" ]]; then + if [[ "$RELEASE" == "true" ]]; then SUITES='["release"]' echo "Release build detected - setting suites to: $SUITES" # No grep pattern for release - run all tests @@ -166,13 +166,13 @@ jobs: matrix: shardIndex: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] shardTotal: [10] - env: OPENAI_API_KEY: ${{ inputs.openai_api_key || secrets.OPENAI_API_KEY }} STORE_API_KEY: ${{ inputs.store_api_key || secrets.STORE_API_KEY }} SEARCH_API_KEY: "${{ secrets.SEARCH_API_KEY }}" ASTRA_DB_APPLICATION_TOKEN: "${{ secrets.ASTRA_DB_APPLICATION_TOKEN }}" ASTRA_DB_API_ENDPOINT: "${{ secrets.ASTRA_DB_API_ENDPOINT }}" + UV_CACHE_DIR: /tmp/.uv-cache outputs: failed: ${{ steps.check-failure.outputs.failed }} steps: @@ -183,50 +183,24 @@ jobs: # else checkout the default ref ref: ${{ inputs.ref || github.ref }} - - name: Setup Node.js + - name: Setup Node ${{ env.NODE_VERSION }} uses: actions/setup-node@v4 id: setup-node with: node-version: ${{ env.NODE_VERSION }} - - - name: Cache Node.js dependencies - uses: actions/cache@v4 - id: npm-cache - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('src/frontend/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + cache: "npm" + cache-dependency-path: ./src/frontend/package-lock.json - name: Install Node.js dependencies - run: | - cd src/frontend - npm ci - if: ${{ steps.setup-node.outputs.cache-hit != 'true' }} - - name: Get Playwright version - run: echo "PLAYWRIGHT_VERSION=$(jq '.devDependencies["@playwright/test"]' src/frontend/package.json -r)" >> $GITHUB_ENV - - name: Cache Playwright binaries - id: playwright-cache - uses: actions/cache@v4 + run: npm ci + working-directory: ./src/frontend + + - name: Install Playwright + id: install-playwright + uses: ./.github/actions/install-playwright with: - path: ~/.cache/ms-playwright - key: playwright-browsers-${{ runner.os }}-${{ env.PLAYWRIGHT_VERSION }} - - - name: Install Frontend dependencies - run: | - cd src/frontend - npm ci - - - name: Install Playwright's browser binaries - run: | - cd src/frontend - npx playwright install --with-deps - if: steps.playwright-cache.outputs.cache-hit != 'true' - - name: Install Playwright's dependencies - run: | - cd src/frontend - npx playwright install-deps - if: steps.playwright-cache.outputs.cache-hit != 'true' + working-directory: ./src/frontend + browsers: chromium - name: "Setup Environment" uses: ./.github/actions/setup-uv diff --git a/src/frontend/src/pages/SignUpPage/index.tsx b/src/frontend/src/pages/SignUpPage/index.tsx index 206e574d8..5b82f77f1 100644 --- a/src/frontend/src/pages/SignUpPage/index.tsx +++ b/src/frontend/src/pages/SignUpPage/index.tsx @@ -1,4 +1,5 @@ import LangflowLogo from "@/assets/LangflowLogo.svg?react"; +import InputComponent from "@/components/core/parameterRenderComponent/components/inputComponent"; import { useAddUser } from "@/controllers/API/queries/auth"; import { CustomLink } from "@/customization/components/custom-link"; import { ENABLE_NEW_LOGO } from "@/customization/feature-flags"; @@ -6,7 +7,6 @@ import { useCustomNavigate } from "@/customization/hooks/use-custom-navigate"; import { track } from "@/customization/utils/analytics"; import * as Form from "@radix-ui/react-form"; import { FormEvent, useEffect, useState } from "react"; -import InputComponent from "../../components/inputComponent"; import { Button } from "../../components/ui/button"; import { Input } from "../../components/ui/input"; import { SIGNUP_ERROR_ALERT } from "../../constants/alerts_constants";