-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (34 loc) · 1.02 KB
/
backend.yml
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
# Ime pipeline-a za backend
name: Backend CI
# Dogodki, ki sprožijo workflow (push in pull request na glavno vejo)
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
# Ime job-a za testiranje backenda
test-backend:
runs-on: ubuntu-latest # Okolje, v katerem bo job tekel
steps:
- name: Checkout code # Kloniranje repozitorija
uses: actions/checkout@v3
- name: Setup Node.js # Namestitev Node.js okolja
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies # Namestitev odvisnosti
run: |
cd 02_DevOps_Testing/primer/backend
npm install
- name: Run tests with coverage # Izvajanje testov s pokritostjo
run: |
cd 02_DevOps_Testing/primer/backend
npm run test:ci
- name: Upload coverage report # Naložitev poročila o pokritosti
uses: actions/upload-artifact@v3
with:
name: backend-coverage
path: 02_DevOps_Testing/primer/backend/coverage/