Skip to content

Commit 4edf0b1

Browse files
committed
Update linters
1 parent 1d9fd9a commit 4edf0b1

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

.github/workflows/integration.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

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

3232
- name: 'npm build'
3333
run: 'npm ci && npm run build'
@@ -47,7 +47,15 @@ jobs:
4747
regional:${{ vars.REGIONAL_SECRET_NAME }}
4848
4949
- name: 'outputs'
50-
run: echo '${{ steps.secrets.outputs.token }}${{ steps.secrets.outputs.password }}${{ steps.secrets.outputs.regional }}'
50+
env:
51+
TOKEN: |-
52+
${{ steps.secrets.outputs.token || '' }}
53+
PASSWORD: |-
54+
${{ steps.secrets.outputs.password || '' }}
55+
REGIONAL: |-
56+
${{ steps.secrets.outputs.regional || '' }}
57+
run: |-
58+
echo '${TOKEN}${PASSWORD}${REGIONAL}'
5159
5260
- id: 'secrets-encoded'
5361
name: 'secrets-encoded'
@@ -60,4 +68,12 @@ jobs:
6068
regional:${{ vars.REGIONAL_SECRET_NAME }}
6169
6270
- name: 'outputs-encoded'
63-
run: echo '${{ steps.secrets-encoded.outputs.token }}${{ steps.secrets-encoded.outputs.password }}${{ steps.secrets-encoded.outputs.regional }}'
71+
env:
72+
TOKEN: |-
73+
${{ steps.secrets-encoded.outputs.token || '' }}
74+
PASSWORD: |-
75+
${{ steps.secrets-encoded.outputs.password || '' }}
76+
REGIONAL: |-
77+
${{ steps.secrets-encoded.outputs.regional || '' }}
78+
run: |-
79+
echo '${TOKEN}${PASSWORD}${REGIONAL}'

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

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/get-secretmanager-secrets"

0 commit comments

Comments
 (0)