diff options
author | 2019-09-20 19:47:35 -0700 | |
---|---|---|
committer | 2019-09-20 20:12:44 -0700 | |
commit | 221a6496908396460364e72cd167d19df01c29be (patch) | |
tree | cf47247c060ec81a402bbdcb343fd5b0da1a8675 | |
parent | CI: publish test results even if a task fails (diff) |
CI: minor refactoring
* Rename some tasks
* Simplify python commands by removing python3 -m
* Break up some long lines
-rw-r--r-- | azure-pipelines.yml | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f0b44db5..64e26661 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -16,10 +16,13 @@ jobs: versionSpec: '3.7.x' addToPath: true - - script: python3 -m pip install pipenv && pipenv install --dev --system && python3 -m pip install flake8-formatter-junit-xml + - script: | + pip install pipenv + pipenv install --dev --system + pip install flake8-formatter-junit-xml displayName: 'Install Project Environment' - - script: python3 -m flake8 --format junit-xml --output-file TEST-lint.xml + - script: flake8 --format junit-xml --output-file TEST-lint.xml displayName: 'Run Linter' - script: | @@ -38,22 +41,27 @@ jobs: displayName: 'Setup Database' - script: | - python manage.py makemigrations --check - python manage.py migrate - coverage run --branch manage.py test --testrunner xmlrunner.extra.djangotestrunner.XMLTestRunner --no-input + python3 manage.py makemigrations --check + python3 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' + displayName: 'Run Tests' - script: coverage report displayName: 'Show Coverage Results' - task: PublishTestResults@2 condition: succeededOrFailed() + displayName: 'Publish Test & Linting Results' inputs: - testResultsFiles: "**/TEST-*.xml" - testRunTitle: 'Site-Django Test Results' + testResultsFiles: '**/TEST-*.xml' + testRunTitle: 'Site Test Results' - job: build displayName: 'Build & Push Container' @@ -63,7 +71,6 @@ jobs: steps: - task: Docker@2 displayName: 'Build & Push Container' - inputs: containerRegistry: 'DockerHubV2' repository: 'pythondiscord/site' |