Skip to content

Commit

Permalink
Merge pull request #49 from myii/chore/standardise-structure
Browse files Browse the repository at this point in the history
feat(yamllint): include for this repo and apply rules throughout
  • Loading branch information
javierbertoli authored Aug 7, 2019
2 parents 1caf9ea + 03d15e9 commit c78aa26
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
---
stages:
- test
- commitlint
- lint
- name: release
if: branch = master AND type != pull_request

Expand Down Expand Up @@ -33,16 +33,21 @@ script:

jobs:
include:
# Define the commitlint stage
- stage: commitlint
# Define the `lint` stage (runs `yamllint` and `commitlint`)
- stage: lint
language: node_js
node_js: lts/*
before_install: skip
script:
# Install and run `yamllint`
- pip install --user yamllint
# yamllint disable-line rule:line-length
- yamllint -s . .yamllint pillar.example test/salt/pillar/repositories.pillar.sls test/salt/pillar/preferences.pillar.sls
# Install and run `commitlint`
- npm install @commitlint/config-conventional -D
- npm install @commitlint/travis-cli -D
- commitlint-travis
# Define the release stage that runs semantic-release
# Define the release stage that runs `semantic-release`
- stage: release
language: node_js
node_js: lts/*
Expand Down
16 changes: 16 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# Extend the `default` configuration provided by `yamllint`
extends: default

# Files to ignore completely
# 1. All YAML files under directory `node_modules/`, introduced during the Travis run
ignore: |
node_modules/
rules:
line-length:
# Increase from default of `80`
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
max: 88
2 changes: 1 addition & 1 deletion pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
apt:
# Set the right keyring for the distro (ie ubuntu-keyring or ...)
keyring_package: debian-archive-keyring

remove_sources_list: true
clean_sources_list_d: true

Expand Down
3 changes: 3 additions & 0 deletions test/integration/preferences/inspec.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: preferences
title: apt formula
maintainer: SaltStack Formulas
Expand Down
3 changes: 3 additions & 0 deletions test/integration/repositories/inspec.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: repositories
title: apt formula
maintainer: SaltStack Formulas
Expand Down
3 changes: 3 additions & 0 deletions test/salt/pillar/preferences.pillar.sls
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
apt:
remove_preferences: true
clean_preferences_d: true
Expand Down
4 changes: 3 additions & 1 deletion test/salt/pillar/repositories.pillar.sls
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
apt:
remove_sources_list: true
clean_sources_list_d: true
Expand All @@ -16,4 +19,3 @@ apt:
arch: [amd64]
comps: []
key_url: https://cli-assets.heroku.com/apt/release.key

0 comments on commit c78aa26

Please sign in to comment.