mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-24 20:30:13 +01:00
* feat(auth.js): add validation for registration endpoint using validateRegistration middleware feat(validateRegistration.js): add middleware to validate registration based on ALLOW_REGISTRATION environment variable * fix(config.js): fix registrationEnabled and socialLoginEnabled variables to handle case-insensitive environment variable values * refactor(validateRegistration.js): remove console.log statement * chore(playwright.yml): skip browser download during yarn install chore(playwright.yml): place Playwright binaries to node_modules/@playwright/test chore(playwright.yml): install Playwright dependencies using npx playwright install-deps chore(playwright.yml): install Playwright chromium browser using npx playwright install chromium chore(playwright.yml): install @playwright/test@latest using npm install -D @playwright/test@latest chore(playwright.yml): run Playwright tests using npm run e2e:ci * chore(playwright.yml): change npm install order and update comment The order of the npm install commands in the "Install Playwright Browsers" step has been changed to first install @playwright/test@latest and then install chromium. Additionally, the comment explaining the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD variable has been updated to mention npm install instead of yarn install. * chore(playwright.yml): remove commented out code for caching and add separate steps for installing Playwright dependencies and browsers
70 lines
No EOL
2 KiB
YAML
70 lines
No EOL
2 KiB
YAML
name: Playwright Tests
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- dev
|
|
- release/*
|
|
paths:
|
|
- 'api/**'
|
|
- 'client/**'
|
|
- 'packages/**'
|
|
- 'e2e/**'
|
|
jobs:
|
|
tests_e2e:
|
|
name: Run Playwright tests
|
|
if: github.event.pull_request.head.repo.full_name == 'danny-avila/LibreChat'
|
|
timeout-minutes: 60
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
NODE_ENV: ci
|
|
CI: true
|
|
SEARCH: false
|
|
BINGAI_TOKEN: user_provided
|
|
CHATGPT_TOKEN: user_provided
|
|
MONGO_URI: ${{ secrets.MONGO_URI }}
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
E2E_USER_EMAIL: ${{ secrets.E2E_USER_EMAIL }}
|
|
E2E_USER_PASSWORD: ${{ secrets.E2E_USER_PASSWORD }}
|
|
JWT_SECRET: ${{ secrets.JWT_SECRET }}
|
|
CREDS_KEY: ${{ secrets.CREDS_KEY }}
|
|
CREDS_IV: ${{ secrets.CREDS_IV }}
|
|
DOMAIN_CLIENT: ${{ secrets.DOMAIN_CLIENT }}
|
|
DOMAIN_SERVER: ${{ secrets.DOMAIN_SERVER }}
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 # Skip downloading during npm install
|
|
PLAYWRIGHT_BROWSERS_PATH: 0 # Places binaries to node_modules/@playwright/test
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: 'npm'
|
|
|
|
- name: Install global dependencies
|
|
run: npm ci
|
|
|
|
- name: Remove sharp dependency
|
|
run: rm -rf node_modules/sharp
|
|
|
|
- name: Install sharp with linux dependencies
|
|
run: cd api && SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install --arch=x64 --platform=linux --libc=glibc sharp
|
|
|
|
- name: Build Client
|
|
run: npm run frontend
|
|
|
|
- name: Install Playwright
|
|
run: |
|
|
npx playwright install-deps
|
|
npm install -D @playwright/test@latest
|
|
npx playwright install chromium
|
|
|
|
- name: Run Playwright tests
|
|
run: npm run e2e:ci
|
|
|
|
- name: Upload playwright report
|
|
uses: actions/upload-artifact@v3
|
|
if: always()
|
|
with:
|
|
name: playwright-report
|
|
path: e2e/playwright-report/
|
|
retention-days: 30 |