Skip to content

Reach out to Travis to get option that includes #205

Closed

Description

@mhdawson

LTS releases + current.

Activity

  1. assigned
    and
    Eomm
    and unassigned on May 13, 2019
  2. ljharb commented on May 13, 2019

    @ljharb
    SponsorMember

    This is already doable by adding matrix lines in .travis.yml for each LTS signifier that nvm supports, as well as node. I'm not sure how it would work to have something in the yml that created more than one item.

  3. dominykas commented on May 14, 2019

    @dominykas
    Member

    This is already doable by adding matrix lines

    Yes, it is possible to do this and we should evangelize that, however I think this issue is to change the default, i.e. the behavior when you have no versions defined. At the moment it will only run in the latest stable - I think we should advocate that it should run in the latest stable + latest LTS and that is without adding any lines other than language: node_js in the .travis.yml.

    I also think that lts/* was intended to support multiple LTS versions, but maybe they never got around to implementing that.

    So, to summarize, what I'd really love to see travis do is support the following:

    • node latest stable Node.js release (same as they currently)
    • lts/active all active LTS Node.js releases (there is no such option right now)
    • default: current (or active or smth like that) equivalent of having both node and lts/active in the version list (currently: default is node).

    Maintainers can then chose to stick to the default (ideally) or override to only test in one or more specific lts/latest/whatever they feel like.

    Docs: https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#specifying-nodejs-versions

    Edit: update to reflect @ljharb's commend on the intent of lts/*.

  4. ljharb commented on May 14, 2019

    @ljharb
    SponsorMember

    I’m the maintainer of nvm who invented “lts/*” - in no way was it ever intended to support multiple versions, it’s a single star and behaves the same way a single star does on the command line, selecting the first matched version only.

  5. dominykas commented on May 14, 2019

    @dominykas
    Member

    Cool, thanks, good to know! Did not realize this comes from nvm and assumed it's a glob.

    Updated to suggest lts/active instead.

  6. ljharb commented on May 14, 2019

    @ljharb
    SponsorMember

    That would still indicate a single version; nvm (travis’ sole means of deciding node version) does not have any concept of selecting multiple versions, only listing them.

    I can certainly ask Travis to change the default matrix to have multiple jobs, but i anticipate pushback about the complexity for users of getting, say, 3 jobs by default, adding 1, and ending up with 1 - if that comes up, how should i respond?

  7. dominykas commented on May 14, 2019

    @dominykas
    Member

    Ideally, library maintainers, esp. for popular libs, should be testing at least in all active LTS plus stable, but if that's not feasible (there's an obvious cost associated with 3x the job runs), then the current default of stable is a good one, I would say.

    Regardless of that, adding a way to define "all active LTS" in a single line of .travis.yml, which does not need to be maintained, would be an awesome feature.

    And even without that feature, possibly Travis could update their docs to highlight the current behavior (that people might not be testing in LTS by default) and include a recommendation with an example of a manual configuration. I'm happy to try and work on a proposal for the docs (not sure if they have them in the open so people can PR).

  8. mhdawson commented on May 17, 2019

    @mhdawson
    MemberAuthor

    I think the

    which does not need to be maintained,

    part would really be helpful. @ljharb if a single entry mapping to multiple entries does not fit the model any other ideas? I wonder about something like LTS-latest, LTS-1, LTS-2 or some other way to try and catch all of the active LTS versions which would not have to be updated for each new release.

  9. ljharb commented on May 18, 2019

    @ljharb
    SponsorMember

    hmm, probably the easiest way would be for me to add a similar feature to nvm; then travis can get it by default.

  10. dominykas commented on Jun 3, 2019

    @dominykas
    Member

    @ljharb any chance there's an update on this? I'd be keen to hear any and all opinions from Travis, before I start drafting #204... Can I be of any assistance on the nvm side of things (a stretch, given I'm no bash guru, but still)?

  11. dominykas commented on Jun 3, 2019

    @dominykas
    Member

    By the way, renovate does have some syntax on this: https://renovatebot.com/node/

  12. ljharb commented on Jun 3, 2019

    @ljharb
    SponsorMember

    @dominykas the more i think about it, the more i don't think it's really compatible with travis without being built into nvm. (the renovate link 404s for me)

  13. dominykas commented on Jun 3, 2019

    @dominykas
    Member

    Looks like a bug in renovate docs routing or smth, here's a link that works: https://renovatebot.com/docs/node/

  14. 26 remaining items

  15. ljharb commented on Nov 14, 2019

    @ljharb
    SponsorMember

    This can now be achieved trivially by using my shared configs: https://twitter.com/ljharb/status/1194728750698487808

    iow, anyone who uses my shared travis configs will get new LTS versions automatically, since i add new node versions to that repo pretty rapidly (and eventually could automate it with github actions).

  16. dominykas commented on Nov 15, 2019

    @dominykas
    Member

    👍 This is great!

    What about deprecating old versions? Oh, I see - it's dependent on the include. Nice.

  17. ljharb commented on Nov 15, 2019

    @ljharb
    SponsorMember

    Happy to add any additional composable "presets" to that shared repo as folks need it.

  18. mhdawson commented on Nov 21, 2019

    @mhdawson
    MemberAuthor

    Very nice !

  19. ljharb commented on Nov 22, 2019

    @ljharb
    SponsorMember

    as an example, node v13.2 just was released, so now every project using the "minors" presets will automatically test on it also (as opposed to instead of 13.1), on their next travis run.

  20. dominykas commented on Nov 27, 2019

    @dominykas
    Member
    1. Should we have this under @pkgjs? I know @ljharb is not some rando on the internet, but if we were to make an official recommendation - should that be in an official repo?
    2. It does a bit more than just include the relevant versions (e.g. npm run tests-only support)? Do we want to be that opinionated? I think I'd favor something that has just the basics.
    3. It would probably make sense to provide includes named based on the keyword convention we have for package support?
  21. mhdawson commented on Nov 27, 2019

    @mhdawson
    MemberAuthor

    I'd be +1 for having it under @pkgjs

  22. ljharb commented on Nov 27, 2019

    @ljharb
    SponsorMember

    I'd be happy to fork it into an official org, and then keep both remotes updated at the same time.

  23. ljharb commented on Nov 27, 2019

    @ljharb
    SponsorMember

    As for the tests-only thing, that's kind of necessary if we want to separate linting, from auditing, from tests - since npm test is supposed to always run 100% of your tests, I've chosen "pretest", "posttest", and "tests-only" as the convention. There always has to be some convention since there's no way to do npm test --ignore-scripts, unfortunately.

  24. dominykas commented on Nov 27, 2019

    @dominykas
    Member

    If I understand it correctly, Travis can import just the nodejs bit - it doesn't need to have the script, env, etc? Similarly, while I personally also prefer to have nvm install-latest-npm in my CI, I would not say that this is the 100% default for everyone?

  25. ljharb commented on Nov 27, 2019

    @ljharb
    SponsorMember

    That's a fair point; I can separate out the matrices, and the "latest npm", to separate imports, to allow people to pick and choose those and define their own script/pretest/posttest settings.

    Separately tho, I'm not sure what use case anyone has in CI for not testing with the latest npm :-)

  26. dominykas commented on Nov 27, 2019

    @dominykas
    Member

    Separately tho, I'm not sure what use case anyone has in CI for not testing with the latest npm :-)

    I can come up with several edge cases, alright... Not sure if they're relevant for people publishing to public npm, though. One example is doing stuff with docker - the base images have a fixed npm which is distributed with the node release. Then there's occasional edge cases for more complex situations with peer deps and/or shrinkwraps, which are about to get breaking changes and ever so often have regressions. Then there's the logic of using the same npm your users are likely to use (i.e. default one bundled with node - although I'd love to see some stats on this!)

    Anyways, like I said - I'm with you on this one ;) just not sure if we want to make it the default.

    Note to self: we should update best practices to include this, if they don't already do that.

  27. ljharb commented on Nov 28, 2019

    @ljharb
    SponsorMember

    I’ll comment here once I’ve separated out the unopinionated parts.

  28. dominykas commented on Aug 28, 2020

    @dominykas
    Member

    We now have https://github.com/nodejs/ci-config-travis - if there's no objections, I'll close this issue in a week or so?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestvendorSome vendor need to be onboard

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions