aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2019-09-20 19:45:03 -0700
committerGravatar MarkKoz <[email protected]>2019-09-20 20:12:43 -0700
commitf7c429f1f987bd1458df86b4e1396ef1da33893a (patch)
tree35e67b1d05f1d079ef64517fcdcd83fb164dd4d0
parentCI: consistent indentation in yml file (diff)
CI: merge lint and test jobs
Diffstat (limited to '')
-rw-r--r--azure-pipelines.yml29
1 files changed, 4 insertions, 25 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index b052f1ae..cdc4ce11 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -1,8 +1,8 @@
# https://aka.ms/yaml
jobs:
- - job: python_lint
- displayName: 'Lint Job'
+ - job: test
+ displayName: 'Test & Lint'
pool:
vmImage: ubuntu-16.04
@@ -19,27 +19,9 @@ jobs:
- script: python3 -m pip install pipenv && pipenv install --dev --system && python3 -m pip install flake8-formatter-junit-xml
displayName: 'Install Project Environment'
- - script: python3 -m flake8 --format junit-xml --output-file test-lint.xml
+ - script: python3 -m flake8 --format junit-xml --output-file TEST-lint.xml
displayName: 'Run Linter'
- - task: PublishTestResults@2
- condition: succeededOrFailed()
- inputs:
- testResultsFiles: '**/test-*.xml'
- testRunTitle: 'Site-Django Lint Results'
-
- - job: coverage_test
- displayName: 'Test Job'
- dependsOn: python_lint
- pool:
- vmImage: ubuntu-16.04
-
- steps:
- - task: UsePythonVersion@0
- inputs:
- versionSpec: '3.7.x'
- architecture: x64
-
- script: |
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
@@ -55,9 +37,6 @@ jobs:
USER_CREATE_COMMAND: CREATE USER pysite WITH PASSWORD 'pysite' CREATEDB
displayName: 'Setup Database'
- - script: python3 -m pip install pipenv && pipenv install --dev --system
- displayName: 'Install Project Environment'
-
- script: |
python manage.py makemigrations --check
python manage.py migrate
@@ -77,7 +56,7 @@ jobs:
- job: build
displayName: 'Build & Push Container'
- dependsOn: coverage_test
+ dependsOn: test
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
steps: