aboutsummaryrefslogtreecommitdiffstats
path: root/azure-pipelines.yml
blob: df4fc5b15f8d24294a1a4b41e04277bdaff2e861 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# https://aka.ms/yaml

jobs:
- job: python_lint
  displayName: 'Lint Job'
  pool:
    vmImage: ubuntu-16.04

  steps:
  - task: UsePythonVersion@0
    displayName: 'Set Python Version'
    inputs:
      versionSpec: '3.7.x'
      addToPath: true

  - 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
    displayName: 'Run Linter'

  - task: PublishTestResults@2
    condition: succeededOrFailed()
    inputs:
      testResultsFiles: '**/test-*.xml'
      testRunTitle: 'Site-Django Lint Results'

  - task: DockerCompose@0
    displayName: Run PostgreSQL DB
    inputs:
      action: Run a specific service
      dockerComposeFile: docker-compose.yml
      projectName: pydis_web
      ports: 7777
      detached: true
      serviceName: postgres