diff --git a/.github/workflows/test.yml b/.github/workflows/ci.yml similarity index 98% rename from .github/workflows/test.yml rename to .github/workflows/ci.yml index 029359cd..e99cb7bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Test +name: CI on: push: diff --git a/apps/server/test/app.e2e-spec.ts b/apps/server/test/app.e2e-spec.ts index 7fd1b831..11cc7e06 100644 --- a/apps/server/test/app.e2e-spec.ts +++ b/apps/server/test/app.e2e-spec.ts @@ -3,6 +3,7 @@ import { INestApplication } from '@nestjs/common'; import * as request from 'supertest'; import { AppModule } from '../src/app/app.module'; import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; +import { appGlobalMiddleware } from 'src/app/useGlobal'; describe('AppController (e2e)', () => { let app: INestApplication; @@ -13,6 +14,13 @@ describe('AppController (e2e)', () => { }).compile(); app = moduleFixture.createNestApplication(); + app.enableCors({ + origin: [ + /^http:\/\/localhost(:\d+)?$/, + /^http:\/\/poster-craft\.leostar\.top(:81)?$/, + ], + }); + appGlobalMiddleware(app); const config = new DocumentBuilder() .setTitle('PosterCraft Swagger') .setDescription('The PosterCraft API description') diff --git a/package.json b/package.json index 9a011c23..7576efe3 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "homepage": "https://github.com/ileostar/PosterCraft", "engines": { - "node": ">=20.12.2" + "node": ">=20" }, "scripts": { "schema:build": "pnpm -F @poster-craft/schema build",