forked from PinSpace-Org/GistPin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub-actions-backend.yml
More file actions
51 lines (42 loc) 路 1004 Bytes
/
Copy pathgithub-actions-backend.yml
File metadata and controls
51 lines (42 loc) 路 1004 Bytes
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
name: Backend Tests
on:
push:
branches: [main]
paths:
- 'Backend/**'
pull_request:
paths:
- 'Backend/**'
jobs:
test:
name: Run Backend Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: Backend
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: Backend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run unit tests with coverage
run: npm run test:cov
env:
NODE_ENV: test
- name: Upload coverage report
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report
path: Backend/coverage/
retention-days: 14
- name: Run e2e tests
run: npm run test:e2e
env:
NODE_ENV: test