Skip to content

Instantly share code, notes, and snippets.

@PennyQ
Last active September 17, 2021 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PennyQ/5533f15f3ffbd977a7cf9a4dab829225 to your computer and use it in GitHub Desktop.
Save PennyQ/5533f15f3ffbd977a7cf9a4dab829225 to your computer and use it in GitHub Desktop.
# Repo: MySpace/TemplateRepo
# File: ci_template.yml
parameters:
- name: pylint_threshold
type: string
default: 8.0
- name: lint_folder
type: string
default: "mockcase-on-test"
jobs:
- job:
displayName: yamllint_checks
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
python -m pip install --upgrade pip
pip install yamllint
yamllint -d "{extends: relaxed, rules: {line-length: {max: 200}, new-line-at-end-of-file: disable, new-lines: disable}}" .
displayName: 'YAML Lint Checks'
- job:
displayName: pylint_checks
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
pip install pylint-fail-under pylint-junit
export PATH="/home/pipeuser/.local/bin":$PATH
pylint-fail-under --fail_under ${{parameters.pylint_threshold}} --output-format=colorized ${{ parameters.lint_folder}}
displayName: 'Pylint fail under ${{ parameters.pylint_threshold }}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment