mirror of
https://github.com/jquery/jquery.git
synced 2026-01-07 21:33:57 -05:00
Build: Simplify caching in CI, use npm ci
Our setup is pretty standard, so manual configuration of `actions/cache` is an overkill. Relying on built-in `actions/node` caching will also resolve differences between caching configurations for macOS/Linux vs. Windows. Also, switch from `npm install` to `npm ci` in CI. Closes gh-5702 Ref jquery/jquery-migrate#597 Ref gh-5703
This commit is contained in:
committed by
GitHub
parent
02cf4ee090
commit
110e46572a
12
.github/workflows/browserstack.yml
vendored
12
.github/workflows/browserstack.yml
vendored
@@ -48,17 +48,11 @@ jobs:
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
|
||||
cache: npm
|
||||
cache-dependency-path: '**/package-lock.json'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
run: npm ci
|
||||
|
||||
- name: Build jQuery
|
||||
run: npm run build:all
|
||||
|
||||
12
.github/workflows/filestash.yml
vendored
12
.github/workflows/filestash.yml
vendored
@@ -25,17 +25,11 @@ jobs:
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
|
||||
cache: npm
|
||||
cache-dependency-path: '**/package-lock.json'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: npm run build:all
|
||||
|
||||
36
.github/workflows/node.js.yml
vendored
36
.github/workflows/node.js.yml
vendored
@@ -51,14 +51,8 @@ jobs:
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: ${{ matrix.NODE_VERSION }}
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock-
|
||||
cache: npm
|
||||
cache-dependency-path: '**/package-lock.json'
|
||||
|
||||
- name: Set download URL for Firefox ESR (old)
|
||||
run: |
|
||||
@@ -84,7 +78,7 @@ jobs:
|
||||
if: contains(matrix.NAME, 'Firefox ESR')
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
run: npm ci
|
||||
|
||||
- name: Build all for linting
|
||||
run: npm run build:all
|
||||
@@ -106,17 +100,11 @@ jobs:
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
|
||||
cache: npm
|
||||
cache-dependency-path: '**/package-lock.json'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
run: npm ci
|
||||
|
||||
- name: Run tests in Edge in IE mode
|
||||
run: npm run test:ie
|
||||
@@ -134,17 +122,11 @@ jobs:
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
|
||||
cache: npm
|
||||
cache-dependency-path: '**/package-lock.json'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
run: npm ci
|
||||
|
||||
- name: Run tests
|
||||
run: npm run test:safari
|
||||
|
||||
Reference in New Issue
Block a user