Rename node-arch to architecture
parent
aabe026707
commit
5984462aaa
|
@ -91,21 +91,21 @@ jobs:
|
||||||
- 10
|
- 10
|
||||||
- 12
|
- 12
|
||||||
- 14
|
- 14
|
||||||
node_arch:
|
architecture:
|
||||||
- x64
|
- x64
|
||||||
# an extra windows-x86 run:
|
# an extra windows-x86 run:
|
||||||
include:
|
include:
|
||||||
- os: windows-2016
|
- os: windows-2016
|
||||||
node_version: 12
|
node_version: 12
|
||||||
node_arch: x86
|
architecture: x86
|
||||||
name: Node ${{ matrix.node_version }} - ${{ matrix.node_arch }} on ${{ matrix.os }}
|
name: Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node_version }}
|
node-version: ${{ matrix.node_version }}
|
||||||
node-arch: ${{ matrix.node_arch }}
|
architecture: ${{ matrix.architecture }}
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm test
|
- run: npm test
|
||||||
```
|
```
|
||||||
|
|
|
@ -356,7 +356,7 @@ describe('setup-node', () => {
|
||||||
}[os.platform];
|
}[os.platform];
|
||||||
|
|
||||||
inputs['node-version'] = version;
|
inputs['node-version'] = version;
|
||||||
inputs['node-arch'] = arch;
|
inputs['architecture'] = arch;
|
||||||
inputs['always-auth'] = false;
|
inputs['always-auth'] = false;
|
||||||
inputs['token'] = 'faketoken';
|
inputs['token'] = 'faketoken';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ inputs:
|
||||||
default: 'false'
|
default: 'false'
|
||||||
node-version:
|
node-version:
|
||||||
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0'
|
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0'
|
||||||
node-arch:
|
architecture:
|
||||||
description: 'Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.'
|
description: 'Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.'
|
||||||
check-latest:
|
check-latest:
|
||||||
description: 'Set this option if you want the action to check for the latest available version that satisfies the version spec'
|
description: 'Set this option if you want the action to check for the latest available version that satisfies the version spec'
|
||||||
|
|
|
@ -4706,11 +4706,11 @@ function run() {
|
||||||
if (!version) {
|
if (!version) {
|
||||||
version = core.getInput('version');
|
version = core.getInput('version');
|
||||||
}
|
}
|
||||||
let arch = core.getInput('node-arch');
|
let arch = core.getInput('architecture');
|
||||||
// if node-arch supplied but node-version is not
|
// if architecture supplied but node-version is not
|
||||||
// if we don't throw a warning, the already installed x64 node will be used which is not probably what user meant.
|
// if we don't throw a warning, the already installed x64 node will be used which is not probably what user meant.
|
||||||
if (arch && !version) {
|
if (arch && !version) {
|
||||||
core.warning('`node-arch` is provided but `node-version` is missing. This results in using an already installed x64 node which is not probably what you meant. To fix this, provide `node-arch` in combination with `node-version`');
|
core.warning('`architecture` is provided but `node-version` is missing. This results in using an already installed x64 node which is not probably what you meant. To fix this, provide `architecture` in combination with `node-version`');
|
||||||
}
|
}
|
||||||
if (!arch) {
|
if (!arch) {
|
||||||
arch = os.arch();
|
arch = os.arch();
|
||||||
|
|
|
@ -16,13 +16,13 @@ export async function run() {
|
||||||
version = core.getInput('version');
|
version = core.getInput('version');
|
||||||
}
|
}
|
||||||
|
|
||||||
let arch = core.getInput('node-arch');
|
let arch = core.getInput('architecture');
|
||||||
|
|
||||||
// if node-arch supplied but node-version is not
|
// if architecture supplied but node-version is not
|
||||||
// if we don't throw a warning, the already installed x64 node will be used which is not probably what user meant.
|
// if we don't throw a warning, the already installed x64 node will be used which is not probably what user meant.
|
||||||
if (arch && !version) {
|
if (arch && !version) {
|
||||||
core.warning(
|
core.warning(
|
||||||
'`node-arch` is provided but `node-version` is missing. This results in using an already installed x64 node which is not probably what you meant. To fix this, provide `node-arch` in combination with `node-version`'
|
'`architecture` is provided but `node-version` is missing. This results in using an already installed x64 node which is not probably what you meant. To fix this, provide `architecture` in combination with `node-version`'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue