Skip to content

Commit 7c5dcde

Browse files
authored
Replace npm-install action with npm ci (#13247)
This PR switches away from the `bahmutov/npm-install` action to plain `npm ci`. If we want to use a cache, `actions/setup-node` includes it and we'd rather leverage that instead. This should reduce one more potential attack vector in case this action caches differently. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated continuous integration workflows to streamline dependency installation across all build pipelines for improved consistency and maintainability. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/apollographql/apollo-client/pull/13247?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 189d166 commit 7c5dcde

9 files changed

Lines changed: 11 additions & 17 deletions

.github/workflows/api-extractor.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ jobs:
2121
with:
2222
node-version: ">=23.6.0"
2323

24-
- name: Install dependencies (with cache)
25-
uses: bahmutov/npm-install@20216767ca67f0f7b4d095dc5859c5700a6581cb # v1
24+
- run: npm ci
2625

2726
# Builds the library and runs the api extractor
2827
- name: Run Api-Extractor

.github/workflows/arethetypeswrong.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
2424
with:
2525
node-version: ">=23.6.0"
26-
- name: Install dependencies (with cache)
27-
uses: bahmutov/npm-install@20216767ca67f0f7b4d095dc5859c5700a6581cb # v1
26+
27+
- run: npm ci
2828

2929
- name: Run build
3030
run: npm run build

.github/workflows/cleanup-checks.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ jobs:
4949
with:
5050
node-version: ">=23.6.0"
5151

52-
- name: Install dependencies (with cache)
53-
uses: bahmutov/npm-install@20216767ca67f0f7b4d095dc5859c5700a6581cb # v1
52+
- run: npm ci
5453

5554
- name: Run Api-Extractor
5655
run: npm run extract-api

.github/workflows/compare-build-output.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
2323
with:
2424
node-version: ">=23.6.0"
25-
- name: Install dependencies (with cache)
26-
uses: bahmutov/npm-install@20216767ca67f0f7b4d095dc5859c5700a6581cb # v1
25+
26+
- run: npm ci
2727

2828
- name: Run comparison script
2929
id: attw

.github/workflows/docmodel.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ jobs:
2121
with:
2222
node-version: ">=23.6.0"
2323

24-
- name: Install dependencies (with cache)
25-
uses: bahmutov/npm-install@20216767ca67f0f7b4d095dc5859c5700a6581cb # v1
24+
- run: npm ci
2625

2726
- name: Generate documentation model
2827
run: npm run docmodel

.github/workflows/knip.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
1717
with:
1818
node-version: "24.x"
19-
- name: Install dependencies (with cache)
20-
uses: bahmutov/npm-install@20216767ca67f0f7b4d095dc5859c5700a6581cb # v1
19+
- run: npm ci
2120
- name: Run knip
2221
run: npm run knip

.github/workflows/publish-pr-releases.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ jobs:
4242
with:
4343
file-filter: "scripts/codemods/ac3-to-ac4/**"
4444

45-
- name: Install dependencies with cache
46-
uses: bahmutov/npm-install@20216767ca67f0f7b4d095dc5859c5700a6581cb # v1
45+
- run: npm ci
4746

4847
- name: Build AC
4948
run: npm run build

.github/workflows/scheduled-test-canary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
3434
with:
3535
node-version: ">=23.6.0"
36-
- uses: bahmutov/npm-install@20216767ca67f0f7b4d095dc5859c5700a6581cb # v1
36+
- run: npm ci
3737
- run: |
3838
npm install react@${MATRIX_TAG} react-dom@${MATRIX_TAG}
3939
env:

.github/workflows/size-limit.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ jobs:
2020
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
2121
with:
2222
node-version: ">=23.6.0"
23-
- name: Install dependencies (with cache)
24-
uses: bahmutov/npm-install@20216767ca67f0f7b4d095dc5859c5700a6581cb # v1
23+
- run: npm ci
2524
- name: Run size-limit
2625
uses: andresz1/size-limit-action@e7493a72a44b113341c0cf6186ab49c17c4b65c1 # v1
2726
with:

0 commit comments

Comments
 (0)