-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add support for nightly and rc versions #611
Changes from 1 commit
06981c4
38d01b1
2900876
ca842d5
6dfecd4
65270bb
882cfba
7df7057
0dbcb6a
30128bf
ce01da2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Files located in data directory are used only for testing purposes. | ||
|
||
|
||
## Here the list of files in the data directory | ||
- `.nvmrc`, `.tools-versions` and `package.json` are used to test node-version-file logic | ||
- `package-lock.json`, `pnpm-lock.yaml` and `yarn.lock` are used to test cache logic | ||
- `versions-manifest.json` is used for unit testing to check downloading Node.js versions from the node-versions repository. | ||
- `node-dist-index.json` is used for unit testing to check downloading Node.js versions from the official site. | ||
- `node-rc-index.json` is used for unit testing to check downloading Node.js rc versions from the official site. | ||
- `node-nightly-index.json` is used for unit testing to check downloading Node.js nightly builds from the official site. |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -106,7 +106,25 @@ jobs: | |||||
|
||||||
## Nightly versions | ||||||
|
||||||
You can specify a nightly version to download it from https://nodejs.org/download/nightly. | ||||||
You can specify a nightly version to download it from https://nodejs.org/download/nightly. | ||||||
|
||||||
### Install nightly build for specific node version | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```yaml | ||||||
jobs: | ||||||
build: | ||||||
runs-on: ubuntu-latest | ||||||
name: Node sample | ||||||
steps: | ||||||
- uses: actions/checkout@v3 | ||||||
- uses: actions/setup-node@v3 | ||||||
with: | ||||||
node-version: '16.0.0-nightly' # it will install the latest nigthly release for node 16.0.0 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- run: npm ci | ||||||
- run: npm test | ||||||
``` | ||||||
|
||||||
### Install nightly build for major node version | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, just for a better flow, I would move this first so it goes major version -> specific version -> exact nightly |
||||||
|
||||||
```yaml | ||||||
jobs: | ||||||
|
@@ -117,7 +135,23 @@ jobs: | |||||
- uses: actions/checkout@v3 | ||||||
- uses: actions/setup-node@v3 | ||||||
with: | ||||||
node-version: '16.0.0-nightly' # or 16-nightly | ||||||
node-version: '16-nightly' # it will install the latest nigthly release for node 16 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- run: npm ci | ||||||
- run: npm test | ||||||
``` | ||||||
|
||||||
### Install the exact nightly version | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```yaml | ||||||
jobs: | ||||||
build: | ||||||
runs-on: ubuntu-latest | ||||||
name: Node sample | ||||||
steps: | ||||||
- uses: actions/checkout@v3 | ||||||
- uses: actions/setup-node@v3 | ||||||
with: | ||||||
node-version: '16.0.0-nightly20210420a0261d231c' | ||||||
- run: npm ci | ||||||
- run: npm test | ||||||
``` | ||||||
|
@@ -140,6 +174,8 @@ jobs: | |||||
- run: npm test | ||||||
``` | ||||||
|
||||||
**Note:** You should specify the exact version for rc: `16.0.0-rc.1`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
## Caching packages data | ||||||
The action follows [actions/cache](https://github.com/actions/cache/blob/main/examples.md#node---npm) guidelines, and caches global cache on the machine instead of `node_modules`, so cache can be reused between different Node.js versions. | ||||||
|
||||||
|
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.
Could you add some info on where these files come from?