mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-30 15:18:50 +01:00
* ci(backend-review.yml): add linter step to the backend review workflow * chore(backend-review.yml): remove prettier from lint-action configuration * chore: apply new linting workflow * chore(lint-staged.config.js): reorder lint-staged tasks for JavaScript and TypeScript files * chore(eslint): update ignorePatterns in .eslintrc.js chore(lint-action): remove prettier option in backend-review.yml chore(package.json): add lint and lint:fix scripts * chore(lint-staged.config.js): remove prettier --write command for js, jsx, ts, tsx files * chore(titleConvo.js): remove unnecessary console.log statement chore(titleConvo.js): add missing comma in options object * chore: apply linting to all files * chore(lint-staged.config.js): update lint-staged configuration to include prettier formatting
44 lines
No EOL
1 KiB
YAML
44 lines
No EOL
1 KiB
YAML
name: Backend Unit Tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- dev
|
|
- release/*
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- dev
|
|
- release/*
|
|
jobs:
|
|
tests_Backend:
|
|
name: Run Backend unit tests
|
|
timeout-minutes: 60
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
MONGO_URI: ${{ secrets.MONGO_URI }}
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
JWT_SECRET: ${{ secrets.JWT_SECRET }}
|
|
CREDS_KEY: ${{ secrets.CREDS_KEY }}
|
|
CREDS_IV: ${{ secrets.CREDS_IV }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use Node.js 19.x
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 19.x
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
# - name: Install Linux X64 Sharp
|
|
# run: npm install --platform=linux --arch=x64 --verbose sharp
|
|
|
|
- name: Run unit tests
|
|
run: cd api && npm run test:ci
|
|
|
|
- name: Run linters
|
|
uses: wearerequired/lint-action@v2
|
|
with:
|
|
eslint: true |