forked from amidaware/tacticalrmm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
56 lines (49 loc) · 1.59 KB
/
azure-pipelines.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
trigger:
- master
- develop
jobs:
- job: setup_env
displayName: "Setup"
strategy:
matrix:
Ubuntu20:
AGENT_NAME: "rmm-ubu20"
pool:
name: linux-vms
demands:
- agent.name -equals $(AGENT_NAME)
steps:
- script: |
sudo -u postgres psql -c 'DROP DATABASE IF EXISTS pipeline'
sudo -u postgres psql -c 'DROP DATABASE IF EXISTS test_pipeline'
sudo -u postgres psql -c 'CREATE DATABASE pipeline'
rm -rf /myagent/_work/1/s/api/env
cd /myagent/_work/1/s/api
python3 -m venv env
source env/bin/activate
cd /myagent/_work/1/s/api/tacticalrmm
pip install --no-cache-dir --upgrade pip
pip install --no-cache-dir setuptools==50.3.2 wheel==0.36.1
pip install --no-cache-dir -r requirements.txt -r requirements-test.txt
displayName: "Install Python Dependencies"
- script: |
cd /myagent/_work/1/s/api
git config user.email "admin@example.com"
git config user.name "Bob"
git fetch
git checkout develop
git pull
source env/bin/activate
cd /myagent/_work/1/s/api/tacticalrmm
coverage run manage.py test -v 2
coveralls
displayName: "Run django tests"
- script: |
rm -rf /myagent/_work/1/s/web/node_modules
cd /myagent/_work/1/s/web
npm install
displayName: "Install Frontend"
- script: |
cd /myagent/_work/1/s/web
npm run test:unit
displayName: "Run Vue Tests"