39 lines
944 B
YAML
39 lines
944 B
YAML
trigger:
|
|
- master
|
|
- develop
|
|
|
|
|
|
jobs:
|
|
- 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 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 tests' |