Saltstack Official PHP Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.travis.yml 6.1KB

feat(yamllint): include for this repo and apply rules throughout * Semi-automated using `ssf-formula` (v0.5.0) * Fix errors shown below: ```bash php-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:") ./test/integration/default/inspec.yml 1:1 warning missing document start "---" (document-start) pillar.example 3:1 warning missing document start "---" (document-start) 7:22 warning truthy value should be one of [false, true] (truthy) 8:22 warning truthy value should be one of [false, true] (truthy) 10:22 warning truthy value should be one of [false, true] (truthy) 16:17 warning truthy value should be one of [false, true] (truthy) 41:12 error wrong indentation: expected 10 but found 11 (indentation) 46:27 warning truthy value should be one of [false, true] (truthy) 70:18 warning truthy value should be one of [false, true] (truthy) 74:19 warning truthy value should be one of [false, true] (truthy) 83:22 warning truthy value should be one of [false, true] (truthy) 97:22 warning truthy value should be one of [false, true] (truthy) 107:89 error line too long (93 > 88 characters) (line-length) 118:20 warning truthy value should be one of [false, true] (truthy) 126:14 error wrong indentation: expected 12 but found 13 (indentation) 126:23 warning truthy value should be one of [false, true] (truthy) 151:20 warning truthy value should be one of [false, true] (truthy) 177:19 warning truthy value should be one of [false, true] (truthy) 197:25 warning truthy value should be one of [false, true] (truthy) ```
5 jaren geleden
feat(yamllint): include for this repo and apply rules throughout * Semi-automated using `ssf-formula` (v0.5.0) * Fix errors shown below: ```bash php-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:") ./test/integration/default/inspec.yml 1:1 warning missing document start "---" (document-start) pillar.example 3:1 warning missing document start "---" (document-start) 7:22 warning truthy value should be one of [false, true] (truthy) 8:22 warning truthy value should be one of [false, true] (truthy) 10:22 warning truthy value should be one of [false, true] (truthy) 16:17 warning truthy value should be one of [false, true] (truthy) 41:12 error wrong indentation: expected 10 but found 11 (indentation) 46:27 warning truthy value should be one of [false, true] (truthy) 70:18 warning truthy value should be one of [false, true] (truthy) 74:19 warning truthy value should be one of [false, true] (truthy) 83:22 warning truthy value should be one of [false, true] (truthy) 97:22 warning truthy value should be one of [false, true] (truthy) 107:89 error line too long (93 > 88 characters) (line-length) 118:20 warning truthy value should be one of [false, true] (truthy) 126:14 error wrong indentation: expected 12 but found 13 (indentation) 126:23 warning truthy value should be one of [false, true] (truthy) 151:20 warning truthy value should be one of [false, true] (truthy) 177:19 warning truthy value should be one of [false, true] (truthy) 197:25 warning truthy value should be one of [false, true] (truthy) ```
5 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. # -*- coding: utf-8 -*-
  2. # vim: ft=yaml
  3. ---
  4. ################################################################################
  5. # NOTE: This file is UNMAINTAINED; it is provided for references purposes only.
  6. # No guarantees are tendered that this structure will work after 2020.
  7. ################################################################################
  8. # * https://en.wikipedia.org/wiki/Travis_CI:
  9. # - "... free open-source plans were removed in [sic] the end of 2020"
  10. # - https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing
  11. # - https://ropensci.org/technotes/2020/11/19/moving-away-travis/
  12. ################################################################################
  13. ## Machine config
  14. os: 'linux'
  15. arch: 'amd64'
  16. dist: 'bionic'
  17. version: '~> 1.0'
  18. ## Language and cache config
  19. language: 'ruby'
  20. cache: 'bundler'
  21. ## Services config
  22. services:
  23. - docker
  24. ## Script to run for the test stage
  25. script:
  26. - bin/kitchen verify "${INSTANCE}"
  27. ## Stages and jobs matrix
  28. stages:
  29. - test
  30. # # As part of the switch away from Travis CI, ensure that the `release` stage
  31. # # is not run inadvertently
  32. # - name: 'release'
  33. # if: 'branch = master AND type != pull_request'
  34. jobs:
  35. allow_failures:
  36. - env: Lint_rubocop
  37. fast_finish: true
  38. include:
  39. ## Define the test stage that runs the linters (and testing matrix, if applicable)
  40. # Run all of the linters in a single job (except `rubocop`)
  41. - language: 'node_js'
  42. node_js: 'lts/*'
  43. env: 'Lint'
  44. name: 'Lint: salt-lint, yamllint, shellcheck & commitlint'
  45. before_install: 'skip'
  46. script:
  47. # Install and run `salt-lint`
  48. - pip install --user salt-lint
  49. - git ls-files -- '*.sls' '*.jinja' '*.j2' '*.tmpl' '*.tst'
  50. | xargs salt-lint
  51. # Install and run `yamllint`
  52. # Need at least `v1.17.0` for the `yaml-files` setting
  53. - pip install --user yamllint>=1.17.0
  54. - yamllint -s .
  55. # Run `shellcheck` (already pre-installed in Travis)
  56. - shellcheck --version
  57. - git ls-files -- '*.sh' '*.bash' '*.ksh'
  58. | xargs shellcheck
  59. # Install and run `commitlint`
  60. - npm i -D @commitlint/config-conventional
  61. @commitlint/travis-cli
  62. - commitlint-travis
  63. # Run the `rubocop` linter in a separate job that is allowed to fail
  64. # Once these lint errors are fixed, this can be merged into a single job
  65. - language: node_js
  66. node_js: lts/*
  67. env: Lint_rubocop
  68. name: 'Lint: rubocop'
  69. before_install: skip
  70. script:
  71. # Install and run `rubocop`
  72. - gem install rubocop
  73. - rubocop -d
  74. # Run `pre-commit` linters in a single job
  75. - language: 'python'
  76. env: 'Lint_pre-commit'
  77. name: 'Lint: pre-commit'
  78. before_install: 'skip'
  79. cache:
  80. directories:
  81. - $HOME/.cache/pre-commit
  82. script:
  83. # Install and run `pre-commit`
  84. - pip install pre-commit==2.7.1
  85. - pre-commit run --all-files --color always --verbose
  86. - pre-commit run --color always --hook-stage manual --verbose commitlint-travis
  87. ## Define the rest of the matrix based on Kitchen testing
  88. # Make sure the instances listed below match up with
  89. # the `platforms` defined in `kitchen.yml`
  90. - env: INSTANCE=debian-debian-10-master-py3
  91. # - env: INSTANCE=ubuntu-ubuntu-1804-master-py3
  92. # - env: INSTANCE=redhat-centos-8-master-py3
  93. # - env: INSTANCE=redhat-fedora-31-master-py3
  94. # - env: INSTANCE=suse-opensuse-leap-151-master-py3
  95. # - env: INSTANCE=redhat-amazonlinux-2-master-py3
  96. # - env: INSTANCE=debian-debian-10-2019-2-py3
  97. # - env: INSTANCE=debian-debian-9-2019-2-py3
  98. - env: INSTANCE=ubuntu-ubuntu-1804-2019-2-py3
  99. # - env: INSTANCE=redhat-centos-8-2019-2-py3
  100. # - env: INSTANCE=redhat-fedora-31-2019-2-py3
  101. # - env: INSTANCE=suse-opensuse-leap-151-2019-2-py3
  102. # - env: INSTANCE=redhat-centos-7-2019-2-py2
  103. - env: INSTANCE=redhat-amazonlinux-2-2019-2-py3
  104. - env: INSTANCE=redhat-fedora-30-2018-3-py3
  105. # - env: INSTANCE=debian-debian-9-2018-3-py2
  106. # - env: INSTANCE=ubuntu-ubuntu-1604-2018-3-py2
  107. # - env: INSTANCE=redhat-centos-7-2018-3-py2
  108. - env: INSTANCE=suse-opensuse-leap-151-2018-3-py2
  109. # - env: INSTANCE=redhat-amazonlinux-1-2018-3-py2
  110. # - env: INSTANCE=debian-debian-8-2017-7-py2
  111. # - env: INSTANCE=ubuntu-ubuntu-1604-2017-7-py2
  112. # - env: INSTANCE=redhat-centos-6-2017-7-py2
  113. # - env: INSTANCE=redhat-fedora-30-2017-7-py2
  114. # - env: INSTANCE=suse-opensuse-leap-151-2017-7-py2
  115. # - env: INSTANCE=redhat-amazonlinux-1-2017-7-py2
  116. ## Define the release stage that runs `semantic-release`
  117. - stage: 'release'
  118. language: 'node_js'
  119. node_js: 'lts/*'
  120. env: 'Release'
  121. name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA'
  122. before_install: 'skip'
  123. script:
  124. # Update `AUTHORS.md`
  125. - export MAINTAINER_TOKEN=${GH_TOKEN}
  126. - go get github.com/myii/maintainer
  127. - maintainer contributor
  128. # Install all dependencies required for `semantic-release`
  129. - npm i -D @semantic-release/changelog@3
  130. @semantic-release/exec@3
  131. @semantic-release/git@7
  132. deploy:
  133. provider: 'script'
  134. # Opt-in to `dpl v2` to complete the Travis build config validation (beta)
  135. # * https://docs.travis-ci.com/user/build-config-validation
  136. # Deprecated `skip_cleanup` can now be avoided, `cleanup: false` is by default
  137. edge: true
  138. # Run `semantic-release`
  139. script: 'npx semantic-release@15.14'
  140. # Notification options: `always`, `never` or `change`
  141. notifications:
  142. webhooks:
  143. if: 'repo = saltstack-formulas/php-formula'
  144. urls:
  145. - https://saltstack-formulas.zulipchat.com/api/v1/external/travis?api_key=HsIq3o5QmLxdnVCKF9is0FUIpkpAY79P&stream=CI&topic=saltstack-formulas%2Fphp-formula&ignore_pull_requests=true
  146. on_success: always # default: always
  147. on_failure: always # default: always
  148. on_start: always # default: never
  149. on_cancel: always # default: always
  150. on_error: always # default: always