51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
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==49.6.0 wheel==0.35.1
|
|
pip install --no-cache-dir -r requirements.txt -r requirements-test.txt
|
|
displayName: "Install Python Dependencies"
|
|
|
|
- script: |
|
|
cd /myagent/_work/1/s/api
|
|
source env/bin/activate
|
|
cd /myagent/_work/1/s/api/tacticalrmm
|
|
python manage.py test -v 2
|
|
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"
|