Virtual-environments: Update yamllint to be installed using pip

Created on 24 Sep 2020  路  8Comments  路  Source: actions/virtual-environments

Tool information

  • Tool name: yamllint
  • Tool license: GNU General Public License v3.0
  • Add or update? Update
  • Desired version: Latest
  • Approximate size:

Area for Triage:

Testing and code coverage

Question, Bug, or Feature?:

yamllint #1142 actually is installed using system packages see #1319 (Ubuntu) and #1320 (Windows).

But this doesn't give us the latest stable version of yamllint and is quite outdated.

We talked about that issue with the yamllint team and they suggested to use pip for the installation:

@adrienverge

I'm for using pip: even if someone dedicates time to actively maintain the deb package, it will always be late compared to the PyPi version (which is pushed a few seconds after a release is created).

Virtual environments affected

  • [x] macOS 10.15
  • [x] Ubuntu 16.04 LTS
  • [x] Ubuntu 18.04 LTS
  • [x] Ubuntu 20.04 LTS
  • [x] Windows Server 2016 R2
  • [x] Windows Server 2019

Can this tool be installed during the build?

pip install yamllint

Tool installation time in runtime

run in 23s on ubuntu-latest

Are you willing to submit a PR?

Yes (but I don't master Windows Server at all...)

feature request

Most helpful comment

Cool, we also changing installation approach on other images for consistency. Will report back when it is done

All 8 comments

For information, and to support this request: the current version installed (.deb) is not actively maintained, and is 19 releases behind the official pip one.

@yvele , @adrienverge , thank you for raising this point.

Honestly, we are trying not install tools through pip because it often installs additional dependencies or can stop work properly after switching python using actions/setup-python.
(P.S: We are not Python experts so could be wrong but previously we had similar issues)

I think we can consider using pipx to install CLI tools like yamllint

I'm not a python expert, @adrienverge do you think pipx will do the job?

I don't know pipx much, but I wouldn't recommend using it. Pip is standard, solid and tested for decades, and if an isolated environment is needed (@maxim-lobanov is it why you propose pipx?) I recommend using a virtualenv (which is a Python standard, like pip).

we are trying not install tools through pip because it often installs additional dependencies

For info, yamllint has only 2 dependencies: pyyaml and pathspec. Hard to do less :wink:

Hello. @adrienverge @yvele , Ubuntu images with yamlint installed via pip (pipx) was deployed everywhere. Could you please validate that it works as expected for you.
After that we will proceed with the same changes on MacOS / Windows

I can confirm I have the latest yamllint version 馃憤 v1.25.0

Thank you @maxim-lobanov

Cool, we also changing installation approach on other images for consistency. Will report back when it is done

Windows and macOS images with yamlint installed via pipx was deployed everywhere also

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ralucapredacegeka picture ralucapredacegeka  路  30Comments

traversaro picture traversaro  路  26Comments

kaylangan picture kaylangan  路  56Comments

jneira picture jneira  路  44Comments

pixyzehn picture pixyzehn  路  30Comments