jellyfin-kodi/.ci/validate.yml

27 lines
903 B
YAML
Raw Normal View History

2020-10-04 00:03:28 +00:00
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
- script: python -m pip install -r requirements-dev.txt
displayName: 'Install dev tools'
- script: |
rm flake8.output
flake8 . --statistics --output-file=flake8.output && echo "::set-output name=lint::ok" || echo "::set-output name=lint::error"
cat flake8.output | awk -F: '{ if ($0 ~ /^\./) { gsub(/^[ \t]+/,"",$4); print "::error file=" $1 ",line=" $2 ",col=" $3 "::" $4 } else { print $0 } }'
displayName: 'Run Linter'
failOnStderr: false
- script: |
rm ../test_results.xml
pytest --junitxml=../test_results.xml
displayName: 'Run Tests'
failOnStderr: false
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '../test_results.xml'
testRunTitle: 'Publish test results for Python $(python.version)'