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
|
2020-09-25 02:10:19 +00:00
|
|
|
displayName: "Setup"
|
2020-05-08 05:37:45 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-09-25 02:10:19 +00:00
|
|
|
Ubuntu20:
|
|
|
|
AGENT_NAME: "rmm-ubu20"
|
2020-05-08 05:37:45 +00:00
|
|
|
|
|
|
|
pool:
|
|
|
|
name: linux-vms
|
|
|
|
demands:
|
|
|
|
- agent.name -equals $(AGENT_NAME)
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- script: |
|
|
|
|
psql -c 'DROP DATABASE IF EXISTS pipeline;' -U postgres
|
2020-09-10 22:24:40 +00:00
|
|
|
psql -c 'DROP DATABASE IF EXISTS test_pipeline;' -U postgres
|
2020-05-08 05:37:45 +00:00
|
|
|
psql -c 'CREATE DATABASE pipeline;' -U postgres
|
|
|
|
|
2020-09-25 02:10:19 +00:00
|
|
|
rm -rf /myagent/_work/1/s/api/env
|
|
|
|
cd /myagent/_work/1/s/api
|
|
|
|
python3 -m venv env
|
2020-05-08 05:37:45 +00:00
|
|
|
source env/bin/activate
|
2020-09-25 02:10:19 +00:00
|
|
|
cd /myagent/_work/1/s/api/tacticalrmm
|
|
|
|
pip install --no-cache-dir --upgrade pip
|
|
|
|
pip install --no-cache-dir setuptools==49.6.0 wheel==0.35.1
|
|
|
|
pip install --no-cache-dir -r requirements.txt
|
2020-05-08 05:37:45 +00:00
|
|
|
displayName: "Install Python Dependencies"
|
|
|
|
|
|
|
|
- script: |
|
2020-09-25 02:10:19 +00:00
|
|
|
cd /myagent/_work/1/s/api
|
2020-05-08 05:37:45 +00:00
|
|
|
source env/bin/activate
|
|
|
|
cd /home/steam/myagent/_work/1/s/api/tacticalrmm
|
|
|
|
python manage.py test -v 2
|
|
|
|
displayName: "Run django tests"
|
|
|
|
|
|
|
|
- script: |
|
2020-09-25 02:10:19 +00:00
|
|
|
rm -rf /myagent/_work/1/s/web/node_modules
|
|
|
|
cd /myagent/_work/1/s/web
|
2020-05-08 05:37:45 +00:00
|
|
|
npm install
|
|
|
|
displayName: "Install Frontend"
|
2019-12-30 21:59:45 +00:00
|
|
|
|
2020-05-08 05:37:45 +00:00
|
|
|
- script: |
|
2020-09-25 02:10:19 +00:00
|
|
|
cd /myagent/_work/1/s/web
|
2020-05-08 05:37:45 +00:00
|
|
|
npm run test:unit
|
|
|
|
displayName: "Run Vue Tests"
|