mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-09-01 19:41:32 +00:00
* ci: bump GitHub Actions to Node.js 24 runtimes Clear Node 20 deprecation warnings on runners by moving workflow actions to majors that declare node24 (checkout, cache, setup-node, artifacts, Docker buildx/build-push/qemu/login, github-script, setup-go, Azure login/helm, create-pull-request, axe-linter). * fix: release leader lock via ioredis on Redis Cluster @keyv/redis EVAL can surface unhandled MOVED redirects on cluster, so resign() logged failure and left LeadingServerUUID set. Use ioredis for leader election SET NX / GET / Lua (same pattern as principals and concurrency locks) so cluster redirects are retried and resignation clears the lock.
89 lines
3.4 KiB
YAML
89 lines
3.4 KiB
YAML
name: Config Migration Tests
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'config/**'
|
|
- 'api/models/**'
|
|
- 'api/db/**'
|
|
- 'packages/data-schemas/src/**'
|
|
- 'packages/data-provider/src/**'
|
|
- 'packages/api/src/acl/**'
|
|
- 'packages/api/src/shared-links/**'
|
|
- '!**.md'
|
|
|
|
env:
|
|
NODE_ENV: CI
|
|
NODE_OPTIONS: '--max-old-space-size=${{ secrets.NODE_MAX_OLD_SPACE_SIZE || 6144 }}'
|
|
|
|
jobs:
|
|
test-config:
|
|
name: 'Tests: config migrations'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Use Node.js 24.16.0
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version: '24.16.0'
|
|
|
|
- name: Restore node_modules cache
|
|
id: cache-node-modules
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: |
|
|
node_modules
|
|
api/node_modules
|
|
packages/api/node_modules
|
|
packages/data-provider/node_modules
|
|
packages/data-schemas/node_modules
|
|
key: node-modules-backend-${{ runner.os }}-20.19-${{ hashFiles('package-lock.json') }}
|
|
|
|
- name: Install dependencies
|
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
run: npm ci
|
|
|
|
- name: Restore data-provider build cache
|
|
id: cache-data-provider
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: packages/data-provider/dist
|
|
key: build-data-provider-${{ runner.os }}-${{ hashFiles('packages/data-provider/src/**', 'packages/data-provider/tsconfig*.json', 'packages/data-provider/tsdown.config.mjs', 'packages/data-provider/package.json') }}
|
|
|
|
- name: Build data-provider
|
|
if: steps.cache-data-provider.outputs.cache-hit != 'true'
|
|
run: npm run build:data-provider
|
|
|
|
- name: Restore data-schemas build cache
|
|
id: cache-data-schemas
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: packages/data-schemas/dist
|
|
key: build-data-schemas-${{ runner.os }}-${{ hashFiles('packages/data-schemas/src/**', 'packages/data-schemas/tsconfig*.json', 'packages/data-schemas/tsdown.config.mjs', 'packages/data-schemas/package.json', 'packages/data-provider/src/**', 'packages/data-provider/tsconfig*.json', 'packages/data-provider/tsdown.config.mjs', 'packages/data-provider/package.json') }}
|
|
|
|
- name: Build data-schemas
|
|
if: steps.cache-data-schemas.outputs.cache-hit != 'true'
|
|
run: npm run build:data-schemas
|
|
|
|
- name: Restore api build cache
|
|
id: cache-api
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: packages/api/dist
|
|
key: build-api-${{ runner.os }}-${{ hashFiles('packages/api/src/**', 'packages/api/tsconfig*.json', 'packages/api/tsdown.config.mjs', 'packages/api/package.json', 'packages/data-provider/src/**', 'packages/data-provider/tsconfig*.json', 'packages/data-provider/tsdown.config.mjs', 'packages/data-provider/package.json', 'packages/data-schemas/src/**', 'packages/data-schemas/tsconfig*.json', 'packages/data-schemas/tsdown.config.mjs', 'packages/data-schemas/package.json') }}
|
|
|
|
- name: Build api
|
|
if: steps.cache-api.outputs.cache-hit != 'true'
|
|
run: npm run build:api
|
|
|
|
- name: Create empty auth.json file
|
|
run: |
|
|
mkdir -p api/data
|
|
echo '{}' > api/data/auth.json
|
|
|
|
- name: Prepare .env.test file
|
|
run: cp api/test/.env.test.example api/test/.env.test
|
|
|
|
- name: Run config migration tests
|
|
run: npm run test:config
|