Skip to content

Commit 05da415

Browse files
committed
Add linters
1 parent e118195 commit 05da415

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
name: 'Set up Node'
4242
uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4
4343
with:
44-
node-version: '20.x'
44+
node-version-file: 'package.json'
4545

4646
- id: 'build'
4747
name: 'Build'

.github/workflows/unit.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ concurrency:
1616
cancel-in-progress: true
1717

1818
jobs:
19+
lint:
20+
uses: 'google-github-actions/.github/.github/workflows/lint.yml@sethvargo/lint' # ratchet:exclude
21+
1922
unit:
2023
strategy:
2124
fail-fast: false
@@ -31,15 +34,16 @@ jobs:
3134

3235
- uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4
3336
with:
34-
node-version: '20.x'
37+
node-version-file: 'package.json'
3538

3639
- name: 'npm build'
3740
run: 'npm ci && npm run build'
3841

3942
- name: 'npm lint'
4043
# There's no need to run the linter for each operating system, since it
4144
# will find the same thing 3x and clog up the PR review.
42-
if: ${{ matrix.os == 'ubuntu-latest' }}
45+
if: |-
46+
${{ matrix.os == 'ubuntu-latest' }}
4347
run: 'npm run lint'
4448

4549
- name: 'npm test'

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
"test": "node --require ts-node/register --test-reporter spec --test ./tests/unit/main.test.ts ./tests/unit/output-parser.test.ts",
1111
"e2e-tests": "node --require ts-node/register --test-reporter spec --test ./tests/e2e.test.ts"
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/create-cloud-deploy-release.git"

0 commit comments

Comments
 (0)