tacticalrmm/azure-pipelines.yml

52 lines
1.4 KiB
YAML
Raw Normal View History

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: |
2020-09-25 02:41:53 +00:00
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'
2020-05-08 05:37:45 +00:00
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
2020-09-29 05:07:29 +00:00
pip install --no-cache-dir -r requirements.txt -r requirements-test.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
2020-09-25 02:13:40 +00:00
cd /myagent/_work/1/s/api/tacticalrmm
2020-12-04 06:40:44 +00:00
coverage run manage.py test -v 2
coveralls
2020-05-08 05:37:45 +00:00
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"