Skip to content

Commit 40f85c8

Browse files
committed
update readme
1 parent e215578 commit 40f85c8

File tree

6 files changed

+21
-35
lines changed

6 files changed

+21
-35
lines changed

Diff for: .github/workflows/e2e-cache.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
os: [ubuntu-latest, windows-latest, macos-latest]
22-
node-version: [10, 12, 14]
22+
node-version: [12, 14, 16]
2323
steps:
2424
- uses: actions/checkout@v2
2525
- name: Clean global cache
@@ -42,7 +42,7 @@ jobs:
4242
fail-fast: false
4343
matrix:
4444
os: [ubuntu-latest, windows-latest, macos-latest]
45-
node-version: [10, 12, 14]
45+
node-version: [12, 14, 16]
4646
steps:
4747
- uses: actions/checkout@v2
4848
- name: Yarn version
@@ -72,7 +72,7 @@ jobs:
7272
fail-fast: false
7373
matrix:
7474
os: [ubuntu-latest, windows-latest, macos-latest]
75-
node-version: [10, 12, 14]
75+
node-version: [12, 14, 16]
7676
steps:
7777
- uses: actions/checkout@v2
7878
- name: Update yarn

Diff for: .github/workflows/proxy.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ jobs:
3030
- uses: actions/checkout@v2
3131
- name: Clear tool cache
3232
run: rm -rf $RUNNER_TOOL_CACHE/*
33-
- name: Setup node 10
33+
- name: Setup node 14
3434
uses: ./
3535
with:
36-
node-version: 10.x
36+
node-version: 14.x
3737
- name: Verify node and npm
38-
run: __tests__/verify-node.sh 10
38+
run: __tests__/verify-node.sh 14
3939

4040
test-bypass-proxy:
4141
runs-on: ubuntu-latest

Diff for: .github/workflows/versions.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
fail-fast: false
5050
matrix:
5151
os: [ubuntu-latest, windows-latest, macos-latest]
52-
node-version: [10.15, 12.16.0, 14.2.0]
52+
node-version: [10.15, 12.16.0, 14.2.0, 16.3.0]
5353
steps:
5454
- uses: actions/checkout@v2
5555
- name: Setup Node
@@ -66,7 +66,7 @@ jobs:
6666
fail-fast: false
6767
matrix:
6868
os: [ubuntu-latest, windows-latest, macos-latest]
69-
node-version: [10, 11, 12, 14]
69+
node-version: [10, 12, 14]
7070
steps:
7171
- uses: actions/checkout@v2
7272
- name: Setup Node and check latest
@@ -116,10 +116,10 @@ jobs:
116116
runs-on: windows-latest
117117
steps:
118118
- uses: actions/checkout@v2
119-
- name: Setup node 12 x86 from dist
119+
- name: Setup node 14 x86 from dist
120120
uses: ./
121121
with:
122-
node-version: '12'
122+
node-version: '14'
123123
architecture: 'x86'
124124
- name: Verify node
125125
run: __tests__/verify-arch.sh "ia32"

Diff for: README.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,24 @@ steps:
2626
- run: npm test
2727
```
2828
29-
The `node-version` input is optional. If not supplied, the node version from PATH will be used. However, this action will still register problem matchers and support auth features. So setting up the node environment is still a valid scenario without downloading and caching versions.
29+
The `node-version` input is optional. If not supplied, the node version from PATH will be used. However, It is recommended to always specify Node.js version and don't rely on system one.
3030

3131
The action will first check the local cache for a semver match. If unable to find a specific version in the cache, the action will attempt to download a version of Node.js. It will pull LTS versions from [node-versions releases](https://github.com/actions/node-versions/releases) and on miss or failure will fall back to the previous behavior of downloading directly from [node dist](https://nodejs.org/dist/).
3232

3333
For information regarding locally cached versions of Node.js on GitHub hosted runners, check out [GitHub Actions Virtual Environments](https://github.com/actions/virtual-environments).
3434

35+
#### Supported version syntax
36+
The `node-version` input supports the following syntax:
37+
38+
major versions: `12`, `14`, `16`
39+
more specific versions: `10.15`, `14.2.0`, `16.3.0`
40+
nvm lts syntax: `lts/erbium`, `lts/fermium`, `lts/*`
41+
3542
### Caching packages dependencies
3643

3744
The action has a built-in functionality for caching and restoring npm/yarn dependencies. Supported package managers are `npm`, `yarn`. The `cache` input is optional, and caching is turned off by default.
3845

46+
**Caching npm dependencies:**
3947
```yaml
4048
steps:
4149
- uses: actions/checkout@v2
@@ -69,7 +77,7 @@ jobs:
6977
runs-on: ubuntu-latest
7078
strategy:
7179
matrix:
72-
node: [ '12', '14' ]
80+
node: [ '12', '14', '16' ]
7381
name: Node ${{ matrix.node }} sample
7482
steps:
7583
- uses: actions/checkout@v2

Diff for: docs/advanced-usage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ jobs:
5252
- macos-latest
5353
- windows-latest
5454
node_version:
55-
- 10
5655
- 12
5756
- 14
57+
- 16
5858
architecture:
5959
- x64
6060
# an extra windows-x86 run:

Diff for: validate/test.sh

-22
This file was deleted.

0 commit comments

Comments
 (0)