@@ -584,9 +584,76 @@ jobs:
584
584
run : ./rewatch/tests/suite-ci.sh node_modules/.bin/rescript
585
585
shell : bash
586
586
587
+ test-integration-pnpm :
588
+ needs :
589
+ - pkg-pr-new
590
+ strategy :
591
+ fail-fast : false
592
+ matrix :
593
+ include :
594
+ - os : macos-13
595
+ - os : macos-14
596
+ - os : ubuntu-24.04
597
+ - os : ubuntu-24.04-arm
598
+ - os : windows-latest
599
+ runs-on : ${{ matrix.os }}
600
+ env :
601
+ RUST_BACKTRACE : " 1"
602
+ steps :
603
+ - name : Install pnpm
604
+ uses : pnpm/action-setup@v4
605
+ with :
606
+ version : 10
607
+
608
+ - name : Use Node.js
609
+ uses : actions/setup-node@v4
610
+ with :
611
+ # Run integration tests with the oldest supported node version.
612
+ node-version : 20
613
+
614
+ - name : Checkout
615
+ uses : actions/checkout@v4
616
+
617
+ - name : Make test directory
618
+ id : tmp-dir
619
+ shell : bash
620
+ run : |
621
+ if [[ "$RUNNER_OS" == "Windows" ]]; then
622
+ dir=$(powershell -Command "[System.IO.Path]::GetTempPath() + [System.Guid]::NewGuid().ToString()" | tr -d '\r')
623
+ mkdir -p "$dir"
624
+ else
625
+ dir=$(mktemp -d)
626
+ fi
627
+ echo "path=$dir" >> "$GITHUB_OUTPUT"
628
+ cp -r tests/package_tests/installation_test/* "$dir"
629
+
630
+ - name : Install ReScript package
631
+ run : |
632
+ COMMIT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
633
+ pnpm i "https://pkg.pr.new/rescript-lang/rescript@${COMMIT_SHA::7}"
634
+ shell : bash
635
+ working-directory : ${{ steps.tmp-dir.outputs.path }}
636
+
637
+ - name : Test installation
638
+ run : pnpm rescript -h && pnpm rescript legacy build && cat src/Test.res.js
639
+ shell : bash
640
+ working-directory : ${{ steps.tmp-dir.outputs.path }}
641
+
642
+ - name : Install ReScript package in rewatch/testrepo
643
+ run : |
644
+ COMMIT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
645
+ yarn add "rescript@https://pkg.pr.new/rescript-lang/rescript@${COMMIT_SHA::7}"
646
+ shell : bash
647
+ working-directory : rewatch/testrepo
648
+
649
+ - name : Run rewatch integration tests
650
+ run : ./rewatch/tests/suite-ci.sh node_modules/.bin/rescript
651
+ shell : bash
652
+
587
653
publish :
588
654
needs :
589
655
- test-integration
656
+ - test-integration-pnpm
590
657
if : startsWith(github.ref, 'refs/tags/v')
591
658
runs-on : ubuntu-24.04-arm
592
659
steps :
0 commit comments