File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Backend Tests
2+
3+ on :
4+ push :
5+ branches :
6+ - ' *'
7+ pull_request :
8+ branches :
9+ - ' *'
10+
11+ defaults :
12+ run :
13+ working-directory : ./api
14+
15+ jobs :
16+ test :
17+ runs-on : ubuntu-latest
18+ timeout-minutes : 2
19+
20+ strategy :
21+ matrix :
22+ node-version : [20]
23+
24+ steps :
25+ - name : Checkout repository
26+ uses : actions/checkout@v4
27+
28+ - name : Set up Node.js with caching
29+ if : github.event_name != 'pull_request'
30+ uses : actions/setup-node@v4
31+ with :
32+ node-version : ${{ matrix.node-version }}
33+ cache : ' npm'
34+ cache-dependency-path : ' ./api/package-lock.json'
35+
36+ - name : Install dependencies
37+ run : npm ci
38+
39+ - name : Enforce formatting with Prettier
40+ run : npm run format
41+
42+ - name : Run ESLint
43+ run : npm run lint
44+
45+ - name : Run tests
46+ run : npm run test:ci
47+
48+ - name : Check for outdated packages
49+ run : npm outdated || echo "No outdated packages found"
50+
51+ - name : Check for security vulnerabilities
52+ run : npm audit --audit-level=high
You can’t perform that action at this time.
0 commit comments