Skip to content

Commit

Permalink
add test-e2e-yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Aug 7, 2023
1 parent e08ee89 commit 0e5b5fb
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ jobs:
npm i -g pnpm@next-7
time make test-e2e-pnpm
- name: Test yarn
- name: Test yarn (classic)
run: |
npm i -g yarn@latest
time make test-e2e-yarn
- name: Test yarn (berry)
run: |
npm i -g yarn@latest
time make test-e2e-yarn-berry
Expand Down
27 changes: 26 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ lib/deno/lib.deno.d.ts:
deno types > lib/deno/lib.deno.d.ts

# End-to-end tests
test-e2e: test-e2e-npm test-e2e-pnpm test-e2e-yarn-berry test-e2e-deno
test-e2e: test-e2e-npm test-e2e-pnpm test-e2e-yarn test-e2e-yarn-berry test-e2e-deno

test-e2e-npm:
# Test normal install
Expand Down Expand Up @@ -189,6 +189,31 @@ test-e2e-pnpm:
# Clean up
rm -fr e2e-pnpm

test-e2e-yarn:
# Test normal install
rm -fr e2e-yarn && mkdir e2e-yarn && cd e2e-yarn && echo {} > package.json && touch yarn.lock && yarn set version classic && yarn add esbuild
cd e2e-yarn && echo "1+2" | yarn esbuild && yarn node -p "require('esbuild').transformSync('1+2').code"
# Test CI reinstall
cd e2e-yarn && rm -fr node_modules && yarn install --immutable
cd e2e-yarn && echo "1+2" | yarn esbuild && yarn node -p "require('esbuild').transformSync('1+2').code"

# Test install without scripts
rm -fr e2e-yarn && mkdir e2e-yarn && cd e2e-yarn && echo {} > package.json && touch yarn.lock && echo 'enableScripts: false' > .yarnrc.yml && yarn set version classic && yarn add esbuild
cd e2e-yarn && echo "1+2" | yarn esbuild && yarn node -p "require('esbuild').transformSync('1+2').code"
# Test CI reinstall
cd e2e-yarn && rm -fr node_modules && yarn install --immutable
cd e2e-yarn && echo "1+2" | yarn esbuild && yarn node -p "require('esbuild').transformSync('1+2').code"

# Test install without optional dependencies
rm -fr e2e-yarn && mkdir e2e-yarn && cd e2e-yarn && echo {} > package.json && touch yarn.lock && yarn set version classic && yarn add esbuild
cd e2e-yarn && echo "1+2" | yarn esbuild && yarn node -p "require('esbuild').transformSync('1+2').code"
# Test CI reinstall
cd e2e-yarn && rm -fr node_modules && yarn install --immutable --ignore-optional
cd e2e-yarn && echo "1+2" | yarn esbuild && yarn node -p "require('esbuild').transformSync('1+2').code"

# Clean up
rm -fr e2e-yarn

test-e2e-yarn-berry:
# Test normal install
rm -fr e2e-yb && mkdir e2e-yb && cd e2e-yb && echo {} > package.json && touch yarn.lock && yarn set version berry && yarn add esbuild
Expand Down

0 comments on commit 0e5b5fb

Please sign in to comment.