@@ -522,7 +522,7 @@ jobs:
522522 git commit -m "Update API docs for ${{ github.ref_name }}"
523523 git push
524524
525- test-integration :
525+ test-installation-npm :
526526 needs :
527527 - pkg-pr-new
528528 strategy :
@@ -573,6 +573,86 @@ jobs:
573573 shell : bash
574574 working-directory : ${{ steps.tmp-dir.outputs.path }}
575575
576+ test-installation-pnpm :
577+ needs :
578+ - pkg-pr-new
579+ strategy :
580+ fail-fast : false
581+ matrix :
582+ include :
583+ - os : macos-13
584+ - os : macos-14
585+ - os : ubuntu-24.04
586+ - os : ubuntu-24.04-arm
587+ - os : windows-latest
588+ runs-on : ${{ matrix.os }}
589+ env :
590+ RUST_BACKTRACE : " 1"
591+ steps :
592+ - name : Install pnpm
593+ uses : pnpm/action-setup@v4
594+ with :
595+ version : 10
596+
597+ - name : Use Node.js
598+ uses : actions/setup-node@v4
599+ with :
600+ # Run integration tests with the oldest supported node version.
601+ node-version : 20
602+
603+ - name : Checkout
604+ uses : actions/checkout@v4
605+
606+ - name : Make test directory
607+ id : tmp-dir
608+ shell : bash
609+ run : |
610+ if [[ "$RUNNER_OS" == "Windows" ]]; then
611+ dir=$(powershell -Command "[System.IO.Path]::GetTempPath() + [System.Guid]::NewGuid().ToString()" | tr -d '\r')
612+ mkdir -p "$dir"
613+ else
614+ dir=$(mktemp -d)
615+ fi
616+ echo "path=$dir" >> "$GITHUB_OUTPUT"
617+ cp -r tests/package_tests/installation_test/* "$dir"
618+
619+ - name : Install ReScript package
620+ run : |
621+ COMMIT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
622+ pnpm i "https://pkg.pr.new/rescript-lang/rescript@${COMMIT_SHA::7}"
623+ shell : bash
624+ working-directory : ${{ steps.tmp-dir.outputs.path }}
625+
626+ - name : Test installation
627+ run : pnpm rescript -h && pnpm rescript legacy build && cat src/Test.res.js
628+ shell : bash
629+ working-directory : ${{ steps.tmp-dir.outputs.path }}
630+
631+ test-integration-rewatch :
632+ needs :
633+ - pkg-pr-new
634+ strategy :
635+ fail-fast : false
636+ matrix :
637+ include :
638+ - os : macos-13
639+ - os : macos-14
640+ - os : ubuntu-24.04
641+ - os : ubuntu-24.04-arm
642+ - os : windows-latest
643+ runs-on : ${{ matrix.os }}
644+ env :
645+ RUST_BACKTRACE : " 1"
646+ steps :
647+ - name : Checkout
648+ uses : actions/checkout@v4
649+
650+ - name : Use Node.js
651+ uses : actions/setup-node@v4
652+ with :
653+ # Run integration tests with the oldest supported node version.
654+ node-version : 20
655+
576656 - name : Install ReScript package in rewatch/testrepo
577657 run : |
578658 COMMIT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
@@ -586,7 +666,9 @@ jobs:
586666
587667 publish :
588668 needs :
589- - test-integration
669+ - test-installation-npm
670+ - test-installation-pnpm
671+ - test-integration-rewatch
590672 if : startsWith(github.ref, 'refs/tags/v')
591673 runs-on : ubuntu-24.04-arm
592674 steps :
0 commit comments