Skip to content

Commit c8b5ca0

Browse files
committed
add --save-dev flag to update version in package.json
1 parent e6fc4cd commit c8b5ca0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ jobs:
2222
with:
2323
node-version: '18'
2424

25+
- name: Get initial sls version
26+
run: |
27+
npm info serverless version
28+
2529
- name: Cache node modules
2630
uses: actions/cache@v3
2731
env:
@@ -41,17 +45,18 @@ jobs:
4145
4246
- name: Install deps
4347
run: |
44-
npm ci
48+
npm install
4549
4650
- name: Update SLS version to v3
4751
if: ${{ matrix.sls-major-version == '3' }}
4852
run: |
49-
npm install serverless@3
53+
npm install --save-dev serverless@3
5054
5155
- name: Check installed version
5256
env:
5357
EXPECTED_SLS_MAJOR_VERSION: ${{ matrix.sls-major-version }}
5458
run : |
59+
cat package.json
5560
installed_sls_version=$(npm info serverless version)
5661
echo "installed serverless version: ${installed_sls_version}"
5762
if [ "${installed_sls_version:0:1}" != ${EXPECTED_SLS_MAJOR_VERSION} ]; then

0 commit comments

Comments
 (0)