ci(github): add linting and improve CI workflow
- Add ESLint configuration for backend TypeScript code - Include linting step in backend quality checks - Add linting step to GitHub Actions CI workflow - Enable configurable Prisma query logging via PRISMA_LOG_QUERIES environment variable - Update PrismaService to support dynamic log levels based on PRISMA_LOG_QUERIES - Replace BadRequestException with UnauthorizedException in receipt import security tests
This commit is contained in:
+22
-14
@@ -37,13 +37,17 @@ jobs:
|
||||
working-directory: ./backend
|
||||
run: npm run prisma:generate
|
||||
|
||||
- name: Verify generated Prisma client is typed
|
||||
working-directory: ./backend
|
||||
run: |
|
||||
if ! grep -q "export \* from '.prisma/client/default'" node_modules/@prisma/client/index.d.ts; then
|
||||
echo "Prisma client export is unexpected";
|
||||
exit 1;
|
||||
fi
|
||||
- name: Verify generated Prisma client is typed
|
||||
working-directory: ./backend
|
||||
run: |
|
||||
if ! grep -q "export \* from '.prisma/client/default'" node_modules/@prisma/client/index.d.ts; then
|
||||
echo "Prisma client export is unexpected";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
- name: Lint backend
|
||||
working-directory: ./backend
|
||||
run: npm run lint
|
||||
|
||||
- name: Build NestJS app
|
||||
working-directory: ./backend
|
||||
@@ -79,13 +83,17 @@ jobs:
|
||||
working-directory: ./backend
|
||||
run: npm run prisma:generate
|
||||
|
||||
- name: Verify generated Prisma client is typed
|
||||
working-directory: ./backend
|
||||
run: |
|
||||
if ! grep -q "export \* from '.prisma/client/default'" node_modules/@prisma/client/index.d.ts; then
|
||||
echo "Prisma client export is unexpected";
|
||||
exit 1;
|
||||
fi
|
||||
- name: Verify generated Prisma client is typed
|
||||
working-directory: ./backend
|
||||
run: |
|
||||
if ! grep -q "export \* from '.prisma/client/default'" node_modules/@prisma/client/index.d.ts; then
|
||||
echo "Prisma client export is unexpected";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
- name: Lint backend
|
||||
working-directory: ./backend
|
||||
run: npm run lint
|
||||
|
||||
- name: Dependency audit (high+critical)
|
||||
working-directory: ./backend
|
||||
|
||||
Reference in New Issue
Block a user