-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial repo layout #6
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,46 @@ | ||
# Shared Travis Configuration Imports | ||
|
||
This repository is managed by the | ||
[package-maintenance team](https://github.com/nodejs/package-maintenance). | ||
- This repository is managed by the [package-maintenance team](https://github.com/nodejs/package-maintenance). | ||
- Read more about [Shared Build Configurations in Travis CI](https://docs.travis-ci.com/user/build-config-imports/). | ||
|
||
## Usage | ||
|
||
Replace the list of `node_js` versions in your `.travis.yml` with one of the available files. | ||
|
||
### Examples | ||
|
||
#### `lts` policy: use LTS and current Node.js releases, starting with v10.x | ||
|
||
``` | ||
import: | ||
- nodejs/ci-config-travis:lts/gte-10.yml | ||
``` | ||
|
||
- Travis CI will use the latest version of each release line in the list | ||
- New major Node.js versions, greater or equal to v10.0.0, will be added to the list as soon as they are released | ||
- Once added, LTS versions will never be removed. Non-LTS versions will be removed when they reach their lifetime. | ||
- Note that if your policy is to only support LTS versions, then removing the non-LTS version in your test matrix is not a breaking change, as the non-LTS version was never supported (it was only used for test purposes). | ||
|
||
|
||
#### `all` policy: use all Node.js releases, starting with v14.x | ||
|
||
``` | ||
import: | ||
- nodejs/ci-config-travis:all/gte-14.yml | ||
``` | ||
|
||
- Travis will use the latest version of each release line in the list | ||
- New major Node.js versions, greater or equal to v14.0.0, will be added to the list as soon as they are released | ||
- Once added, versions will never be removed from the list | ||
|
||
|
||
#### Strict `lts` policy: use only LTS Node.js releases, starting with v10.x | ||
|
||
``` | ||
import: | ||
- nodejs/ci-config-travis:lts/strict/gte-10.yml | ||
``` | ||
|
||
- Travis will use the latest version of each release line in the list | ||
- New major Node.js versions, greater or equal to v14.0.0, will be added to the list as soon as they achieve LTS status (i.e. ~6 months after they are released) | ||
- Once added, versions will never be removed from the list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_js: | ||
- 10 | ||
- 11 | ||
- 12 | ||
- 13 | ||
- 14 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_js: | ||
- 11 | ||
- 12 | ||
- 13 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_js: | ||
- 12 | ||
- 13 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_js: | ||
- 13 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_js: | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
node_js: | ||
- 4 | ||
- 5 | ||
- 6 | ||
- 7 | ||
- 8 | ||
- 9 | ||
- 10 | ||
- 11 | ||
- 12 | ||
- 13 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
node_js: | ||
- 5 | ||
- 6 | ||
- 7 | ||
- 8 | ||
- 9 | ||
- 10 | ||
- 11 | ||
- 12 | ||
- 13 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
node_js: | ||
- 6 | ||
- 7 | ||
- 8 | ||
- 9 | ||
- 10 | ||
- 11 | ||
- 12 | ||
- 13 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
node_js: | ||
- 7 | ||
- 8 | ||
- 9 | ||
- 10 | ||
- 11 | ||
- 12 | ||
- 13 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
node_js: | ||
- 8 | ||
- 9 | ||
- 10 | ||
- 11 | ||
- 12 | ||
- 13 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_js: | ||
- 9 | ||
- 10 | ||
- 11 | ||
- 12 | ||
- 13 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_js: | ||
- 10 | ||
- 12 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_js: | ||
- 12 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_js: | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_js: | ||
- 4 | ||
- 6 | ||
- 8 | ||
- 10 | ||
- 12 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_js: | ||
- 6 | ||
- 8 | ||
- 10 | ||
- 12 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_js: | ||
- 8 | ||
- 10 | ||
- 12 | ||
- 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_js: | ||
- 10 | ||
- 12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_js: | ||
- 12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_js: | ||
- 4 | ||
- 6 | ||
- 8 | ||
- 10 | ||
- 12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_js: | ||
- 6 | ||
- 8 | ||
- 10 | ||
- 12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_js: | ||
- 8 | ||
- 10 | ||
- 12 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could import gte-11, etc, so they're all composed together - is there a reason you didn't go that route?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That did not occur to me, TBH - I kept it simple and explicit.
I figure explicit is better than indirect for someone looking at the file as well - no need to go click through and trace things?
Doubt performance is major issue, but fewer imports should be faster too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt it affects performance much; i have a chain of imports to build up almost 300 jobs on all 250+ of my projects and it works fine :-)
as for explicit/implicit, that's a fair point - i'm more thinking of the likelihood of an error in one file being noticed, versus in the chain of imports it'd be very noticeable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, fair point on error tracking, but that's probably more of an issue when the files are a little more complex than what we have here?
Having errors in these files would have a pretty bad knock on effect, if the ecosystem adopts this, but we can mitigate against that:
.travis.yml
in here, which just imports all the available files via local import (node --version
or smth as a test script itself). It shouldn't matter if Travis deduplicates or duplicates the final list (it has the various merge strategies, but I don't recall anything about deduplication) - doing this would at least guarantee the file validation - I think the job just freezes if it doesn't validate? Might need to work aroundYou can import up to 25 build configuration snippets in total.
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been asking travis for item 2 there for a long time :-/ some kind of
travis reify
command would be amazing (we could build it, it's just better to use the canonical implementation). Certainly a viable (but complex) approach would be generating a build on a throwaway branch, downloading the derived config from it, and then cancelling the build (all theroetically doable via travis' API).You're also totally right about the 25 import limit, which I've told them repeatedly is way too low, so maybe your item 1 is a more reliable approach.
(To be clear, I'm content to consider this a followon and not a blocker)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did build some of that into
detect-node-support
. It's not canonical, but I think it's close enough (checked against https://github.com/travis-ci/travis-yaml) and the only missing feature, I think, is theif
support (cause I didn't need it). There is code in there for the merge strategies, but I didn't check how does fetch things, esp. from private repos 🤔 I wonder if it's possibly to write a CLI wrapper or smth around theirtravis-yaml
thing 🤔