Skip to content

Commit b555fb4

Browse files
authored
Update linters (#384)
1 parent 6d287a3 commit b555fb4

File tree

7 files changed

+19
-15
lines changed

7 files changed

+19
-15
lines changed

.github/workflows/cleanup.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,17 @@ jobs:
2323

2424
- uses: 'google-github-actions/setup-gcloud@v2' # ratchet:exclude
2525

26-
- name: Delete services
26+
- name: 'Delete services'
27+
env:
28+
PROJECT_ID: '${{ vars.PROJECT_ID }}'
2729
run: |-
28-
gcloud config set core/project "${{ vars.PROJECT_ID }}"
30+
gcloud config set "core/project" "${PROJECT_ID}"
2931
3032
# List and delete all versions that were deployed 30 minutes ago or
3133
# earlier. The date math here is a little weird, but we're looking for
3234
# deployments "earlier than" 30 minutes ago, so it's less than since
3335
# time increases.
34-
(IFS=$'\n'; for NAME in $(gcloud app versions list --format="value(id)" --filter="service != "default" AND version.createTime < '-pt30m'"); do
36+
(IFS=$'\n'; for NAME in $(gcloud app versions list --format='value(id)' --filter='service != "default" AND version.createTime < "-pt30m"'); do
3537
echo "Deleting ${NAME}..."
36-
gcloud app versions delete ${NAME} --quiet
38+
gcloud app versions delete "${NAME}" --quiet
3739
done)

.github/workflows/integration.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ concurrency:
1717

1818
jobs:
1919
integration:
20-
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}
20+
if: |-
21+
${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}
2122
permissions:
2223
contents: 'read'
2324
id-token: 'write'
@@ -28,7 +29,7 @@ jobs:
2829

2930
- uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4
3031
with:
31-
node-version: '20.x'
32+
node-version-file: 'package.json'
3233

3334
- name: 'npm build'
3435
run: 'npm ci && npm run build'
@@ -46,6 +47,7 @@ jobs:
4647
id: 'deploy'
4748
uses: './'
4849
with:
50+
project_id: '${{ vars.PROJECT_ID }}'
4951
working_directory: '${{ github.workspace }}/example-app'
5052
build_env_vars: |-
5153
FOO=bar

.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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ inputs:
5454
description: |-
5555
Promote the deployed version to receive all traffic.
5656
required: false
57-
default: "true"
57+
default: 'true'
5858

5959
flags:
6060
description: |-

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}

example-app/app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
runtime: nodejs20
15+
runtime: 'nodejs20'

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/deploy-appengine"

0 commit comments

Comments
 (0)