From f7c429f1f987bd1458df86b4e1396ef1da33893a Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Fri, 20 Sep 2019 19:45:03 -0700 Subject: CI: merge lint and test jobs --- azure-pipelines.yml | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'azure-pipelines.yml') 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: -- cgit v1.2.3