Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-lobanov committed Jun 30, 2021
1 parent e215578 commit 40f85c8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/e2e-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10, 12, 14]
node-version: [12, 14, 16]
steps:
- uses: actions/checkout@v2
- name: Clean global cache
Expand All @@ -42,7 +42,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10, 12, 14]
node-version: [12, 14, 16]
steps:
- uses: actions/checkout@v2
- name: Yarn version
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10, 12, 14]
node-version: [12, 14, 16]
steps:
- uses: actions/checkout@v2
- name: Update yarn
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
- uses: actions/checkout@v2
- name: Clear tool cache
run: rm -rf $RUNNER_TOOL_CACHE/*
- name: Setup node 10
- name: Setup node 14
uses: ./
with:
node-version: 10.x
node-version: 14.x
- name: Verify node and npm
run: __tests__/verify-node.sh 10
run: __tests__/verify-node.sh 14

test-bypass-proxy:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10.15, 12.16.0, 14.2.0]
node-version: [10.15, 12.16.0, 14.2.0, 16.3.0]
steps:
- uses: actions/checkout@v2
- name: Setup Node
Expand All @@ -66,7 +66,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10, 11, 12, 14]
node-version: [10, 12, 14]
steps:
- uses: actions/checkout@v2
- name: Setup Node and check latest
Expand Down Expand Up @@ -116,10 +116,10 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup node 12 x86 from dist
- name: Setup node 14 x86 from dist
uses: ./
with:
node-version: '12'
node-version: '14'
architecture: 'x86'
- name: Verify node
run: __tests__/verify-arch.sh "ia32"
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,24 @@ steps:
- run: npm test
```
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.
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.

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/).

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).

#### Supported version syntax
The `node-version` input supports the following syntax:

major versions: `12`, `14`, `16`
more specific versions: `10.15`, `14.2.0`, `16.3.0`
nvm lts syntax: `lts/erbium`, `lts/fermium`, `lts/*`

### Caching packages dependencies

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.

**Caching npm dependencies:**
```yaml
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -69,7 +77,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '12', '14' ]
node: [ '12', '14', '16' ]
name: Node ${{ matrix.node }} sample
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ jobs:
- macos-latest
- windows-latest
node_version:
- 10
- 12
- 14
- 16
architecture:
- x64
# an extra windows-x86 run:
Expand Down
22 changes: 0 additions & 22 deletions validate/test.sh

This file was deleted.

0 comments on commit 40f85c8

Please sign in to comment.