2019-12-30 21:32:07 +00:00
|
|
|
trigger:
|
2020-05-08 05:37:45 +00:00
|
|
|
- master
|
|
|
|
- develop
|
2019-12-30 21:32:07 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-05-08 05:37:45 +00:00
|
|
|
- job: setup_env
|
|
|
|
displayName: "Setup Environment"
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Ubuntu18:
|
|
|
|
AGENT_NAME: "rmm-ubuntu18"
|
|
|
|
|
|
|
|
pool:
|
|
|
|
name: linux-vms
|
|
|
|
demands:
|
|
|
|
- agent.name -equals $(AGENT_NAME)
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- script: |
|
|
|
|
psql -c 'DROP DATABASE IF EXISTS pipeline;' -U postgres
|
|
|
|
psql -c 'CREATE DATABASE pipeline;' -U postgres
|
|
|
|
|
|
|
|
rm -rf /home/steam/myagent/_work/1/s/api/env
|
|
|
|
cd /home/steam/myagent/_work/1/s/api
|
|
|
|
python3.7 -m venv env
|
|
|
|
source env/bin/activate
|
|
|
|
cd /home/steam/myagent/_work/1/s/api/tacticalrmm
|
|
|
|
pip install --upgrade pip
|
|
|
|
pip install -r requirements.txt -r requirements-test.txt
|
|
|
|
displayName: "Install Python Dependencies"
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
cd /home/steam/myagent/_work/1/s/api
|
|
|
|
source env/bin/activate
|
|
|
|
cd /home/steam/myagent/_work/1/s/api/tacticalrmm
|
|
|
|
python manage.py test -v 2
|
|
|
|
displayName: "Run django tests"
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
rm -rf /home/steam/myagent/_work/1/s/web/node_modules
|
|
|
|
cd /home/steam/myagent/_work/1/s/web
|
|
|
|
npm install
|
|
|
|
displayName: "Install Frontend"
|
2019-12-30 21:59:45 +00:00
|
|
|
|
2020-05-08 05:37:45 +00:00
|
|
|
- script: |
|
|
|
|
cd /home/steam/myagent/_work/1/s/web
|
|
|
|
npm run test:unit
|
|
|
|
displayName: "Run Vue Tests"
|