ci/cd: update azure pipelines to include yamllint. resolves #8575 (#8613)

This commit is contained in:
Diego Heras 2020-05-13 20:05:13 +02:00 committed by GitHub
parent 6419c8c335
commit ff0e9546d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 2 deletions

View File

@ -260,7 +260,8 @@ stages:
displayName: Code Style Compliance
dependsOn: []
jobs:
- job: Linting
- job: Linting_Dotnet
displayName: Linting Dotnet
pool:
vmImage: ubuntu-latest
workspace:
@ -298,6 +299,26 @@ stages:
dotnet-format --dry-run --check --verbosity diagnostic --folder ./src/Jackett.Tray
dotnet-format --dry-run --check --verbosity diagnostic --folder ./src/Jackett.Updater
- job: Linting_YAML
displayName: Linting YAML
pool:
vmImage: ubuntu-latest
workspace:
clean: all
steps:
- checkout: self
- task: UsePythonVersion@0
displayName: Install Python
inputs:
versionSpec: '3.8'
- script: pip install yamllint
displayName: Install yamllint
- script: yamllint -c ./yamllint.yml ./src/Jackett.Common/Definitions/
displayName: Lint YAML
- stage: UnitTestJackett
displayName: Unit Tests
dependsOn: CodeStyle
@ -399,7 +420,9 @@ stages:
- stage: Integration
displayName: Integration Tests
dependsOn: BuildJackett
dependsOn:
- BuildJackett
- CodeStyle
jobs:
- job: Selenium
workspace:

16
yamllint.yml Normal file
View File

@ -0,0 +1,16 @@
---
#
# doc https://yamllint.readthedocs.io/en/stable/
#
# run in local (linux)
# install => sudo python3 -m pip install yamllint
# run => yamllint -s -c ./yamllint.yml ./src/Jackett.Common/Definitions/
#
extends: default
rules:
document-start:
level: error
line-length: disable
key-duplicates: disable
truthy: disable