tacticalrmm/azure-pipelines.yml

54 lines
1.5 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
2020-12-07 00:35:38 +00:00
pip install --no-cache-dir setuptools==50.3.2 wheel==0.36.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
2020-12-16 09:25:28 +00:00
if [ $? -ne 0 ]; then
exit 1
fi
2020-05-08 05:37:45 +00:00
displayName: "Run django tests"
2020-12-16 10:38:00 +00:00
- script: |
2020-12-16 10:41:39 +00:00
cd /myagent/_work/1/s/api
source env/bin/activate
cd /myagent/_work/1/s/api/tacticalrmm
2020-12-16 10:38:00 +00:00
export CIRCLE_BRANCH=$BUILD_SOURCEBRANCH
coveralls
displayName: "coveralls"
env:
CIRCLECI: 1
CIRCLE_BUILD_NUM: $(Build.BuildNumber)