Skip to content

Commit

Permalink
feat(ufw): add specific pip3 customisations to .travis.yml
Browse files Browse the repository at this point in the history
* `ufw` is still stuck on `trusty` on Travis
  - This doesn't work with when `salt` is installed during the
    `salt-lint` installation process (issue with `tornado`)
  - Installing via. Python 3 works, albeit much slower
  • Loading branch information
myii committed Oct 10, 2019
1 parent 9ec9b1e commit c3acbd1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ssf/files/default/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,21 @@ jobs:
name: '{{ name_linters }}'
before_install: skip
script:
{%- set pip_cmd = 'pip' %}
{%- set pkgs_for_salt_lint = 'salt-lint' %}
{%- if semrel_formula == 'ufw' %}
{%- set pip_cmd = 'pip3' %}
{%- set pkgs_for_salt_lint = pkgs_for_salt_lint ~ ' PyYAML==4.2b4' %}
# Need to use `pip3` due to using `{{ travis.dist }}` on Travis
- sudo apt-get install python3-pip python3-setuptools python3-wheel -y
{%- endif %}
# Install and run `salt-lint`
- pip install --user salt-lint
- {{ pip_cmd }} install --user {{ pkgs_for_salt_lint }}
- git ls-files | grep '\.sls$\|\.jinja$\|\.j2$\|\.tmpl$'
| xargs -I {} salt-lint {}
# Install and run `yamllint`
# Need at least `v1.17.0` for the `yaml-files` setting
- pip install --user yamllint>=1.17.0
- {{ pip_cmd }} install --user yamllint>=1.17.0
- yamllint -s .
{%- if travis.use_single_job_for_linters %}
{{- format_rubocop_linter() }}
Expand Down

0 comments on commit c3acbd1

Please sign in to comment.