aboutsummaryrefslogtreecommitdiffstats
path: root/azure-pipelines.yml
diff options
context:
space:
mode:
authorGravatar scragly <[email protected]>2019-09-21 13:24:21 +1000
committerGravatar scragly <[email protected]>2019-09-21 13:24:21 +1000
commitced9e637df9c13cd52707e4d4b2141b1d0af7862 (patch)
treee9e653a02ebf21efa3b0e20344ddbd6251741e07 /azure-pipelines.yml
parentAdd some bad stuff for lint test to pick up. (diff)
Gut CI to only lint.
Diffstat (limited to 'azure-pipelines.yml')
-rw-r--r--azure-pipelines.yml67
1 files changed, 0 insertions, 67 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 450e005b..e1bef935 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -6,9 +6,6 @@ jobs:
pool:
vmImage: ubuntu-16.04
- variables:
- PIP_CACHE_DIR: .cache/pip
-
steps:
- task: UsePythonVersion@0
displayName: 'Set Python Version'
@@ -27,67 +24,3 @@ jobs:
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'
- sudo apt-get update -y
- sudo apt-get install -y postgresql-11
- displayName: 'Install PostgreSQL'
-
- - script: |
- echo "$USER_CREATE_COMMAND;" > pgscript.sql
- echo "CREATE DATABASE pysite OWNER pysite;" >> pgscript.sql
- sudo su postgres -c "psql < pgscript.sql"
- env:
- 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
- coverage run --branch manage.py test --testrunner xmlrunner.extra.djangotestrunner.XMLTestRunner --no-input
- env:
- CI: azure
- DATABASE_URL: postgres://pysite:pysite@localhost/pysite
- displayName: 'Run Test'
-
- - script: coverage report
- displayName: 'Show Coverage Results'
-
- - task: PublishTestResults@2
- inputs:
- testResultsFiles: "**/TEST-*.xml"
- testRunTitle: 'Site-Django Test Results'
-
-- job: build
- displayName: 'Build & Push Container'
- dependsOn: coverage_test
- condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
-
- steps:
- - task: Docker@2
- displayName: 'Build & Push Container'
-
- inputs:
- containerRegistry: 'DockerHubV2'
- repository: 'pythondiscord/site'
- command: 'buildAndPush'
- Dockerfile: 'docker/app/Dockerfile'
- buildContext: '.'
- tags: 'latest'