Skip to content

Commit 88882b4

Browse files
authored
Revert "chore(ci): Use yarn for node tests instead of npm (#2612)" (#2624)
We need to revert installing dependencies with `yarn` because in contrast to `npm`, `yarn` exits the installation of `optionalDependencies` if the version does not exist. We're running into this edge case on our release branch, where we first bump the dependency versions to the next version to be released and then run tests which try to install this new version.
1 parent c6d075d commit 88882b4

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/test_node.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ jobs:
2020
node-version-file: package.json
2121

2222
# We need to skip the fallback download because downloading will fail on release branches because the new version isn't available yet.
23-
- run: SENTRYCLI_SKIP_DOWNLOAD=1 yarn install --frozen-lockfile
23+
# We have to use npm here because yarn fails on the non-existing existing optionalDependency version:
24+
# https://github.com/yarnpkg/berry/issues/2425#issuecomment-1627807326
25+
- run: SENTRYCLI_SKIP_DOWNLOAD=1 npm install
2426

25-
- run: yarn check:types
27+
- run: npm run check:types
2628

2729
test_node:
2830
strategy:
@@ -42,13 +44,12 @@ jobs:
4244
node-version: ${{ matrix.node-version }}
4345

4446
# We need to skip the fallback download because downloading will fail on release branches because the new version isn't available yet.
45-
- run: SENTRYCLI_SKIP_DOWNLOAD=1 yarn install --frozen-lockfile
46-
if: matrix.node-version != '10.x' && matrix.node-version != '12.x'
47+
# We have to use npm here because yarn fails on the non-existing existing optionalDependency version:
48+
# https://github.com/yarnpkg/berry/issues/2425#issuecomment-1627807326
49+
- run: SENTRYCLI_SKIP_DOWNLOAD=1 npm install
4750

4851
# older node versions need an older nft
49-
- run: |
50-
SENTRYCLI_SKIP_DOWNLOAD=1 yarn install --ignore-engines --frozen-lockfile
51-
SENTRYCLI_SKIP_DOWNLOAD=1 yarn add @vercel/nft@0.22.1 --ignore-engines
52+
- run: SENTRYCLI_SKIP_DOWNLOAD=1 npm install @vercel/nft@0.22.1
5253
if: matrix.node-version == '10.x' || matrix.node-version == '12.x'
5354

54-
- run: yarn test
55+
- run: npm test

0 commit comments

Comments
 (0)