Skip to content

Commit 74eba50

Browse files
committed
Add pnpm installation test
1 parent 437ed3a commit 74eba50

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,36 @@ jobs:
573573
shell: bash
574574
working-directory: ${{ steps.tmp-dir.outputs.path }}
575575

576+
- name: Install pnpm
577+
uses: pnpm/action-setup@v4
578+
with:
579+
version: 10
580+
581+
- name: Make test directory (pnpm)
582+
id: tmp-dir-pnpm
583+
shell: bash
584+
run: |
585+
if [[ "$RUNNER_OS" == "Windows" ]]; then
586+
dir=$(powershell -Command "[System.IO.Path]::GetTempPath() + [System.Guid]::NewGuid().ToString()" | tr -d '\r')
587+
mkdir -p "$dir"
588+
else
589+
dir=$(mktemp -d)
590+
fi
591+
echo "path=$dir" >> "$GITHUB_OUTPUT"
592+
cp -r tests/package_tests/installation_test/* "$dir"
593+
594+
- name: Install ReScript package (pnpm)
595+
run: |
596+
COMMIT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
597+
pnpm i "https://pkg.pr.new/rescript-lang/rescript@${COMMIT_SHA::7}"
598+
shell: bash
599+
working-directory: ${{ steps.tmp-dir-pnpm.outputs.path }}
600+
601+
- name: Test installation (pnpm)
602+
run: pnpm rescript -h && pnpm rescript legacy build && cat src/Test.res.js
603+
shell: bash
604+
working-directory: ${{ steps.tmp-dir-pnpm.outputs.path }}
605+
576606
- name: Install ReScript package in rewatch/testrepo
577607
run: |
578608
COMMIT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"

0 commit comments

Comments
 (0)