blob: 7755e5ea412252e1089b851532ca88bd4e098e51 (
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
37
|
# https://aka.ms/yaml
jobs:
- job: python_lint
displayName: 'Lint Job'
pool:
vmImage: ubuntu-16.04
steps:
- 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
- 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'
|