forked from LFGBanditLabs/Quipay
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 1.39 KB
/
Copy pathbackend.yml
File metadata and controls
52 lines (49 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Backend CI
on:
push:
branches: [main]
pull_request:
paths:
- backend/**
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: backend/package-lock.json
- run: npm ci
working-directory: backend
- name: Security audit
run: npm audit --audit-level=high
working-directory: backend
- run: npm run build
working-directory: backend
- run: npm test
working-directory: backend
query-performance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: backend/package-lock.json
- name: Start PostgreSQL
uses: harmon758/postgresql-action@v1
with:
postgresql db: testdb
postgresql user: testuser
postgresql password: testpass
- name: Set DATABASE_URL
run: echo "DATABASE_URL=postgres://testuser:testpass@localhost:5432/testdb" >> $GITHUB_ENV
- run: npm ci
working-directory: backend
- run: npm run test:explain-analyze
working-directory: backend
env:
DATABASE_URL: postgres://testuser:testpass@localhost:5432/testdb