Skip to content

Commit c4f360c

Browse files
authored
Update linters (#390)
1 parent b497d55 commit c4f360c

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

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

3333
- name: 'npm build'
3434
run: 'npm ci && npm run build'

.github/workflows/unit.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,14 @@ jobs:
3636

3737
- uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4
3838
with:
39-
node-version: '20.12.x' # https://github.com/nodejs/node/issues/53033
39+
node-version-file: 'package.json'
4040

4141
- name: 'npm build'
4242
run: 'npm ci && npm run build'
4343

44-
- name: 'npm lint'
45-
# There's no need to run the linter for each operating system, since it
46-
# will find the same thing 3x and clog up the PR review.
47-
if: ${{ matrix.os == 'ubuntu-latest' }}
48-
run: 'npm run lint'
49-
5044
# Only authenticate if this is a full CI run.
51-
- if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
45+
- if: |-
46+
${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
5247
uses: 'google-github-actions/auth@v2' # ratchet:exclude
5348
with:
5449
workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}'

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: Cloud Storage Uploader
2-
description: Upload files or folders to GCS buckets
3-
author: Google LLC
1+
name: 'Cloud Storage Uploader'
2+
description: 'Upload files or folders to GCS buckets'
3+
author: 'Google LLC'
44

55
inputs:
66
#

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
@@ -10,6 +10,10 @@
1010
"format": "eslint . --fix",
1111
"test": "bash ./bin/runTests.sh"
1212
},
13+
"engines": {
14+
"node": "20.x",
15+
"npm": "10.x"
16+
},
1317
"repository": {
1418
"type": "git",
1519
"url": "https://github.com/google-github-actions/upload-cloud-storage"

0 commit comments

Comments
 (0)