nginx-formula/.travis.yml

116 lines
4.0 KiB
YAML
Raw Normal View History

# -*- coding: utf-8 -*-
# vim: ft=yaml
---
## Machine config
dist: bionic
2018-03-17 21:25:25 +01:00
sudo: required
services:
- docker
2018-03-17 21:25:25 +01:00
## Language and cache config
language: ruby
cache: bundler
## Script to run for the test stage
2019-04-12 22:08:25 +02:00
script:
- bin/kitchen verify "${INSTANCE}"
## Stages and jobs matrix
stages:
- test
- name: release
if: branch = master AND type != pull_request
jobs:
allow_failures:
- env: Lint_rubocop
fast_finish: true
include:
## Define the test stage that runs the linters (and testing matrix, if applicable)
# Run all of the linters in a single job (except `rubocop`)
- language: node_js
node_js: lts/*
env: Lint
name: 'Lint: salt-lint, yamllint & commitlint'
before_install: skip
script:
# Install and run `salt-lint`
- pip install --user salt-lint
- git ls-files | grep '\.sls$\|\.jinja$\|\.j2$\|\.tmpl$'
| xargs -I {} salt-lint {}
feat(yamllint): include for this repo and apply rules throughout * Semi-automated using `ssf-formula` (v0.5.0) * Fix errors shown below: ```bash nginx-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:") pillar.example 5:1 warning missing document start "---" (document-start) 6:89 error line too long (110 > 88 characters) (line-length) 7:89 error line too long (99 > 88 characters) (line-length) 19:89 error line too long (132 > 88 characters) (line-length) 35:25 warning truthy value should be one of [false, true] (truthy) 36:89 error line too long (106 > 88 characters) (line-length) 40:89 error line too long (115 > 88 characters) (line-length) 43:16 warning truthy value should be one of [false, true] (truthy) 44:89 error line too long (105 > 88 characters) (line-length) 48:16 warning truthy value should be one of [false, true] (truthy) 54:14 warning too few spaces before comment (comments) 57:13 warning truthy value should be one of [false, true] (truthy) 57:18 warning too few spaces before comment (comments) 58:14 warning too few spaces before comment (comments) 60:5 warning missing starting space in comment (comments) 60:89 error line too long (96 > 88 characters) (line-length) 61:89 error line too long (90 > 88 characters) (line-length) 62:89 error line too long (90 > 88 characters) (line-length) 63:89 error line too long (94 > 88 characters) (line-length) 64:5 warning missing starting space in comment (comments) 64:89 error line too long (96 > 88 characters) (line-length) 68:9 error wrong indentation: expected 10 but found 8 (indentation) 76:9 error wrong indentation: expected 10 but found 8 (indentation) 86:9 error wrong indentation: expected 10 but found 8 (indentation) 90:14 warning too few spaces before comment (comments) 90:89 error line too long (104 > 88 characters) (line-length) 92:6 warning missing starting space in comment (comments) 92:89 error line too long (106 > 88 characters) (line-length) 94:89 error line too long (104 > 88 characters) (line-length) 97:6 warning missing starting space in comment (comments) 97:89 error line too long (106 > 88 characters) (line-length) 100:62 warning too few spaces before comment (comments) 100:89 error line too long (121 > 88 characters) (line-length) 101:62 warning comment not indented like content (comments-indentation) 101:89 error line too long (116 > 88 characters) (line-length) 102:89 error line too long (112 > 88 characters) (line-length) 103:89 error line too long (99 > 88 characters) (line-length) 105:89 error line too long (124 > 88 characters) (line-length) 106:8 warning missing starting space in comment (comments) 106:89 error line too long (117 > 88 characters) (line-length) 112:89 error line too long (97 > 88 characters) (line-length) 120:31 warning missing starting space in comment (comments) 123:89 error line too long (95 > 88 characters) (line-length) 127:13 error wrong indentation: expected 14 but found 12 (indentation) 151:33 warning too few spaces before comment (comments) 151:89 error line too long (94 > 88 characters) (line-length) 152:22 warning too few spaces before comment (comments) 152:89 error line too long (90 > 88 characters) (line-length) 153:21 warning too few spaces before comment (comments) 153:89 error line too long (101 > 88 characters) (line-length) 154:22 warning too few spaces before comment (comments) 155:18 warning too few spaces before comment (comments) 155:89 error line too long (103 > 88 characters) (line-length) 163:89 error line too long (100 > 88 characters) (line-length) 164:89 error line too long (106 > 88 characters) (line-length) 165:18 warning truthy value should be one of [false, true] (truthy) 167:89 error line too long (109 > 88 characters) (line-length) 170:10 warning missing starting space in comment (comments) 172:10 warning missing starting space in comment (comments) 172:89 error line too long (120 > 88 characters) (line-length) 173:10 warning missing starting space in comment (comments) 173:89 error line too long (118 > 88 characters) (line-length) 174:89 error line too long (120 > 88 characters) (line-length) 175:20 warning truthy value should be one of [false, true] (truthy) 175:89 error line too long (102 > 88 characters) (line-length) 177:89 error line too long (100 > 88 characters) (line-length) 178:89 error line too long (101 > 88 characters) (line-length) 182:13 error wrong indentation: expected 14 but found 12 (indentation) 184:15 error wrong indentation: expected 16 but found 14 (indentation) 186:15 error wrong indentation: expected 16 but found 14 (indentation) 189:15 error wrong indentation: expected 16 but found 14 (indentation) 193:9 warning comment not indented like content (comments-indentation) 196:13 error wrong indentation: expected 14 but found 12 (indentation) 198:15 error wrong indentation: expected 16 but found 14 (indentation) 202:15 error wrong indentation: expected 16 but found 14 (indentation) 206:9 warning comment not indented like content (comments-indentation) 218:16 warning too few spaces before comment (comments) 218:89 error line too long (96 > 88 characters) (line-length) 219:18 warning truthy value should be one of [false, true] (truthy) 223:57 warning too few spaces before comment (comments) 223:89 error line too long (111 > 88 characters) (line-length) 224:57 warning comment not indented like content (comments-indentation) 224:89 error line too long (118 > 88 characters) (line-length) 226:89 error line too long (90 > 88 characters) (line-length) 236:18 warning truthy value should be one of [false, true] (truthy) 245:89 error line too long (108 > 88 characters) (line-length) 252:89 error line too long (104 > 88 characters) (line-length) 305:89 error line too long (115 > 88 characters) (line-length) 306:32 error trailing spaces (trailing-spaces) test/salt/default/pillar/nginx.sls 1:1 error too many blank lines (1 > 0) (empty-lines) 7:1 warning missing document start "---" (document-start) 11:9 error wrong indentation: expected 10 but found 8 (indentation) 23:18 warning truthy value should be one of [false, true] (truthy) 24:18 warning truthy value should be one of [false, true] (truthy) 28:18 warning truthy value should be one of [false, true] (truthy) 31:13 error wrong indentation: expected 14 but found 12 (indentation) 33:15 error wrong indentation: expected 16 but found 14 (indentation) 36:15 error wrong indentation: expected 16 but found 14 (indentation) 38:1 error too many blank lines (1 > 0) (empty-lines) ```
2019-08-06 21:57:39 +02:00
# Install and run `yamllint`
# Need at least `v1.17.0` for the `yaml-files` setting
- pip install --user yamllint>=1.17.0
- yamllint -s .
feat(yamllint): include for this repo and apply rules throughout * Semi-automated using `ssf-formula` (v0.5.0) * Fix errors shown below: ```bash nginx-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:") pillar.example 5:1 warning missing document start "---" (document-start) 6:89 error line too long (110 > 88 characters) (line-length) 7:89 error line too long (99 > 88 characters) (line-length) 19:89 error line too long (132 > 88 characters) (line-length) 35:25 warning truthy value should be one of [false, true] (truthy) 36:89 error line too long (106 > 88 characters) (line-length) 40:89 error line too long (115 > 88 characters) (line-length) 43:16 warning truthy value should be one of [false, true] (truthy) 44:89 error line too long (105 > 88 characters) (line-length) 48:16 warning truthy value should be one of [false, true] (truthy) 54:14 warning too few spaces before comment (comments) 57:13 warning truthy value should be one of [false, true] (truthy) 57:18 warning too few spaces before comment (comments) 58:14 warning too few spaces before comment (comments) 60:5 warning missing starting space in comment (comments) 60:89 error line too long (96 > 88 characters) (line-length) 61:89 error line too long (90 > 88 characters) (line-length) 62:89 error line too long (90 > 88 characters) (line-length) 63:89 error line too long (94 > 88 characters) (line-length) 64:5 warning missing starting space in comment (comments) 64:89 error line too long (96 > 88 characters) (line-length) 68:9 error wrong indentation: expected 10 but found 8 (indentation) 76:9 error wrong indentation: expected 10 but found 8 (indentation) 86:9 error wrong indentation: expected 10 but found 8 (indentation) 90:14 warning too few spaces before comment (comments) 90:89 error line too long (104 > 88 characters) (line-length) 92:6 warning missing starting space in comment (comments) 92:89 error line too long (106 > 88 characters) (line-length) 94:89 error line too long (104 > 88 characters) (line-length) 97:6 warning missing starting space in comment (comments) 97:89 error line too long (106 > 88 characters) (line-length) 100:62 warning too few spaces before comment (comments) 100:89 error line too long (121 > 88 characters) (line-length) 101:62 warning comment not indented like content (comments-indentation) 101:89 error line too long (116 > 88 characters) (line-length) 102:89 error line too long (112 > 88 characters) (line-length) 103:89 error line too long (99 > 88 characters) (line-length) 105:89 error line too long (124 > 88 characters) (line-length) 106:8 warning missing starting space in comment (comments) 106:89 error line too long (117 > 88 characters) (line-length) 112:89 error line too long (97 > 88 characters) (line-length) 120:31 warning missing starting space in comment (comments) 123:89 error line too long (95 > 88 characters) (line-length) 127:13 error wrong indentation: expected 14 but found 12 (indentation) 151:33 warning too few spaces before comment (comments) 151:89 error line too long (94 > 88 characters) (line-length) 152:22 warning too few spaces before comment (comments) 152:89 error line too long (90 > 88 characters) (line-length) 153:21 warning too few spaces before comment (comments) 153:89 error line too long (101 > 88 characters) (line-length) 154:22 warning too few spaces before comment (comments) 155:18 warning too few spaces before comment (comments) 155:89 error line too long (103 > 88 characters) (line-length) 163:89 error line too long (100 > 88 characters) (line-length) 164:89 error line too long (106 > 88 characters) (line-length) 165:18 warning truthy value should be one of [false, true] (truthy) 167:89 error line too long (109 > 88 characters) (line-length) 170:10 warning missing starting space in comment (comments) 172:10 warning missing starting space in comment (comments) 172:89 error line too long (120 > 88 characters) (line-length) 173:10 warning missing starting space in comment (comments) 173:89 error line too long (118 > 88 characters) (line-length) 174:89 error line too long (120 > 88 characters) (line-length) 175:20 warning truthy value should be one of [false, true] (truthy) 175:89 error line too long (102 > 88 characters) (line-length) 177:89 error line too long (100 > 88 characters) (line-length) 178:89 error line too long (101 > 88 characters) (line-length) 182:13 error wrong indentation: expected 14 but found 12 (indentation) 184:15 error wrong indentation: expected 16 but found 14 (indentation) 186:15 error wrong indentation: expected 16 but found 14 (indentation) 189:15 error wrong indentation: expected 16 but found 14 (indentation) 193:9 warning comment not indented like content (comments-indentation) 196:13 error wrong indentation: expected 14 but found 12 (indentation) 198:15 error wrong indentation: expected 16 but found 14 (indentation) 202:15 error wrong indentation: expected 16 but found 14 (indentation) 206:9 warning comment not indented like content (comments-indentation) 218:16 warning too few spaces before comment (comments) 218:89 error line too long (96 > 88 characters) (line-length) 219:18 warning truthy value should be one of [false, true] (truthy) 223:57 warning too few spaces before comment (comments) 223:89 error line too long (111 > 88 characters) (line-length) 224:57 warning comment not indented like content (comments-indentation) 224:89 error line too long (118 > 88 characters) (line-length) 226:89 error line too long (90 > 88 characters) (line-length) 236:18 warning truthy value should be one of [false, true] (truthy) 245:89 error line too long (108 > 88 characters) (line-length) 252:89 error line too long (104 > 88 characters) (line-length) 305:89 error line too long (115 > 88 characters) (line-length) 306:32 error trailing spaces (trailing-spaces) test/salt/default/pillar/nginx.sls 1:1 error too many blank lines (1 > 0) (empty-lines) 7:1 warning missing document start "---" (document-start) 11:9 error wrong indentation: expected 10 but found 8 (indentation) 23:18 warning truthy value should be one of [false, true] (truthy) 24:18 warning truthy value should be one of [false, true] (truthy) 28:18 warning truthy value should be one of [false, true] (truthy) 31:13 error wrong indentation: expected 14 but found 12 (indentation) 33:15 error wrong indentation: expected 16 but found 14 (indentation) 36:15 error wrong indentation: expected 16 but found 14 (indentation) 38:1 error too many blank lines (1 > 0) (empty-lines) ```
2019-08-06 21:57:39 +02:00
# Install and run `commitlint`
- npm install @commitlint/config-conventional -D
- npm install @commitlint/travis-cli -D
- commitlint-travis
# Run the `rubocop` linter in a separate job that is allowed to fail
# Once these lint errors are fixed, this can be merged into a single job
- language: node_js
node_js: lts/*
env: Lint_rubocop
name: 'Lint: rubocop'
before_install: skip
script:
# Install and run `rubocop`
- gem install rubocop
- rubocop -d
## Define the rest of the matrix based on Kitchen testing
# Make sure the instances listed below match up with
# the `platforms` defined in `kitchen.yml`
- env: INSTANCE=default-debian-10-develop-py3
# - env: INSTANCE=default-ubuntu-1804-develop-py3
# - env: INSTANCE=default-centos-7-develop-py3
# - env: INSTANCE=default-fedora-30-develop-py3
# - env: INSTANCE=default-opensuse-leap-15-develop-py3
# - env: INSTANCE=default-amazonlinux-2-develop-py2
# - env: INSTANCE=default-arch-base-latest-develop-py2
# - env: INSTANCE=default-debian-9-2019-2-py3
- env: INSTANCE=default-ubuntu-1804-2019-2-py3
- env: INSTANCE=default-centos-7-2019-2-py3
# - env: INSTANCE=default-fedora-30-2019-2-py3
# - env: INSTANCE=default-opensuse-leap-15-2019-2-py3
# - env: INSTANCE=default-amazonlinux-2-2019-2-py2
- env: INSTANCE=default-arch-base-latest-2019-2-py2
# - env: INSTANCE=default-debian-9-2018-3-py2
# - env: INSTANCE=default-ubuntu-1604-2018-3-py2
# - env: INSTANCE=default-centos-7-2018-3-py2
- env: INSTANCE=default-fedora-29-2018-3-py2
- env: INSTANCE=default-opensuse-leap-15-2018-3-py2
# - env: INSTANCE=default-amazonlinux-2-2018-3-py2
# - env: INSTANCE=default-arch-base-latest-2018-3-py2
# - env: INSTANCE=default-debian-8-2017-7-py2
# - env: INSTANCE=default-ubuntu-1604-2017-7-py2
- env: INSTANCE=default-centos-6-2017-7-py2
# - env: INSTANCE=default-fedora-29-2017-7-py2
# - env: INSTANCE=default-opensuse-leap-15-2017-7-py2
# - env: INSTANCE=default-amazonlinux-2-2017-7-py2
# - env: INSTANCE=default-arch-base-latest-2017-7-py2
## Define the release stage that runs `semantic-release`
- stage: release
language: node_js
node_js: lts/*
env: Release
name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA'
before_install: skip
script:
# Update `AUTHORS.md`
- export MAINTAINER_TOKEN=${GH_TOKEN}
- go get github.com/myii/maintainer
- maintainer contributor
# Install all dependencies required for `semantic-release`
- npm install @semantic-release/changelog@3 -D
- npm install @semantic-release/exec@3 -D
- npm install @semantic-release/git@7 -D
deploy:
provider: script
skip_cleanup: true
script:
# Run `semantic-release`
- npx semantic-release@15