tacticalrmm/azure-pipelines.yml

63 lines
1.8 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:
2021-01-31 02:42:10 +00:00
Debian10:
AGENT_NAME: "azpipelines-deb10"
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
2021-02-21 07:37:19 +00:00
python3.9 -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
2021-02-21 07:37:19 +00:00
pip install --no-cache-dir setuptools==53.0.0 wheel==0.36.2
2020-12-19 08:24:47 +00:00
pip install --no-cache-dir -r requirements.txt -r requirements-test.txt -r requirements-dev.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
2020-12-19 08:24:47 +00:00
- script: |
cd /myagent/_work/1/s/api
source env/bin/activate
2021-02-03 20:11:49 +00:00
black --exclude migrations/ --check tacticalrmm
2020-12-19 08:24:47 +00:00
if [ $? -ne 0 ]; then
exit 1
fi
displayName: "Codestyle black"
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)