Skip to content

Commit e595fb2

Browse files
committed
Update linters
1 parent 38f4124 commit e595fb2

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

.github/workflows/unit.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,10 @@ jobs:
3131

3232
- uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4
3333
with:
34-
node-version: '20.x'
34+
node-version-file: 'package.json'
3535

3636
- name: 'npm build'
3737
run: 'npm ci && npm run build'
3838

39-
- name: 'npm lint'
40-
# There's no need to run the linter for each operating system, since it
41-
# will find the same thing 3x and clog up the PR review.
42-
if: ${{ matrix.os == 'ubuntu-latest' }}
43-
run: 'npm run lint'
44-
4539
- name: 'npm test'
4640
run: 'npm run test'

action.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: SSH to Google Cloud Platform compute instances
16-
author: Google LLC
15+
name: 'SSH to Google Cloud Platform compute instances'
16+
author: 'Google LLC'
1717
description: |-
18-
Use this action to connect to Google Cloud Platform instances via ssh and execute user's commands.
18+
Use this action to connect to Google Cloud Platform instances via ssh and
19+
execute user's commands.
1920
2021
inputs:
2122
instance_name:
@@ -71,7 +72,8 @@ inputs:
7172
required: false
7273

7374
project_id:
74-
description: The GCP project ID. Overrides project ID set by credentials.
75+
description: |-
76+
The GCP project ID. Overrides project ID set by credentials.
7577
required: false
7678

7779
flags:
@@ -97,9 +99,11 @@ inputs:
9799

98100
outputs:
99101
stdout:
100-
description: Stdout from ssh command.
102+
description: |-
103+
Stdout from ssh command.
101104
stderr:
102-
description: Stderr from ssh command.
105+
description: |-
106+
Stderr from ssh command.
103107
104108
branding:
105109
icon: 'terminal'

bin/runTests.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ set -eEuo pipefail
1616
FILES="$(node -e "process.stdout.write(require('node:fs').readdirSync('./', { recursive: true }).filter((e) => {return e.endsWith('.test.ts') && !e.startsWith('node_modules');}).sort().join(' '));")"
1717

1818
set -x
19+
20+
# shellcheck disable=SC2086
1921
exec node --require ts-node/register --test-reporter spec --test ${FILES}

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"format": "eslint . --fix",
1010
"test": "bash ./bin/runTests.sh"
1111
},
12+
"engines": {
13+
"node": "20.x",
14+
"npm": "10.x"
15+
},
1216
"repository": {
1317
"type": "git",
1418
"url": "https://github.com/google-github-actions/ssh-compute.git"

0 commit comments

Comments
 (0)