Compare commits

...

12 Commits

Author SHA1 Message Date
44c9c18728 Merge pull request #142 from actions/joshmgross/run-tests-on-windows
Run test job on windows-latest
2020-04-21 16:16:40 -04:00
e715d9a456 Merge pull request #137 from actions/joshmgross/log-node-version
Log node and npm versions
2020-04-21 15:45:36 -04:00
b1f2e78536 Use matrix for workflow 2020-04-21 14:43:21 -04:00
55897e37f3 Run test job on windows-latest 2020-04-21 14:39:51 -04:00
46903d1fb1 Await exec calls to ensure proper version ordering 2020-04-21 14:17:29 -04:00
28505ad4d3 Move version to args 2020-04-21 14:13:03 -04:00
2d53d29868 Use actions/exec for getting version 2020-04-21 14:03:26 -04:00
1e163ded31 Quote exec parameters 2020-04-21 11:40:45 -04:00
ffde538781 Only include npm version if npm exists 2020-04-21 11:23:19 -04:00
e99a7e62b2 Add dist changes 2020-04-16 11:47:45 -04:00
0dc69b3a71 Remove extra version logging 2020-04-16 10:56:07 -04:00
52eb8a7524 Log node and npm version 2020-04-16 10:45:55 -04:00
4 changed files with 25 additions and 1 deletions

View File

@ -28,7 +28,13 @@ jobs:
run: __tests__/verify-no-unstaged-changes.sh
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: Clear tool cache

7
dist/index.js vendored
View File

@ -15201,6 +15201,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(__webpack_require__(470));
const exec = __importStar(__webpack_require__(986));
const installer = __importStar(__webpack_require__(749));
const auth = __importStar(__webpack_require__(202));
const path = __importStar(__webpack_require__(622));
@ -15218,6 +15219,12 @@ function run() {
if (version) {
yield installer.getNode(version);
}
// Output version of node and npm that are being used
yield exec.exec('node', ['--version']);
// Older versions of Node don't include npm, so don't let this call fail
yield exec.exec('npm', ['--version'], {
ignoreReturnCode: true
});
const registryUrl = core.getInput('registry-url');
const alwaysAuth = core.getInput('always-auth');
if (registryUrl) {

View File

@ -24,6 +24,7 @@
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.2",
"@actions/exec": "^1.0.3",
"@actions/github": "^1.1.0",
"@actions/http-client": "^1.0.6",
"@actions/io": "^1.0.2",

View File

@ -1,4 +1,6 @@
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import * as io from '@actions/io';
import * as installer from './installer';
import * as auth from './authutil';
import * as path from 'path';
@ -17,6 +19,14 @@ async function run() {
await installer.getNode(version);
}
// Output version of node and npm that are being used
await exec.exec('node', ['--version']);
// Older versions of Node don't include npm, so don't let this call fail
await exec.exec('npm', ['--version'], {
ignoreReturnCode: true
});
const registryUrl: string = core.getInput('registry-url');
const alwaysAuth: string = core.getInput('always-auth');
if (registryUrl) {