Skip to content

Commit ee938f5

Browse files
committed
Exec the installation test in an isolated directory
1 parent 9cc28e0 commit ee938f5

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -506,33 +506,36 @@ jobs:
506506
steps:
507507
- name: Checkout
508508
uses: actions/checkout@v4
509-
with:
510-
sparse-checkout: |
511-
.nvmrc
512-
packages/test
513509

514510
- name: Use Node.js
515511
uses: actions/setup-node@v4
516512
with:
517513
node-version-file: .nvmrc
518514

515+
- name: Make test directory
516+
id: tmp-dir
517+
shell: bash
518+
run: |
519+
dir=$(mktemp -d)
520+
echo "path=$dir" >> "$GITHUB_OUTPUT"
521+
519522
- name: Download artifacts
520523
uses: actions/download-artifact@v4
521524
with:
522525
name: npm-packages
523-
path: packages/test
526+
path: ${{ steps.tmp-dir.outputs.path }}
524527

525528
- name: Install ReScript package
526529
run: |
527530
npm i --ignore-scripts --no-audit \
528531
rescript-${{ needs.package.outputs.rescript_version }}.tgz
529532
shell: bash
530-
working-directory: packages/test
533+
working-directory: ${{ steps.tmp-dir.outputs.path }}
531534

532535
- name: Test installation
533536
run: npx rescript -h && npx rescript build && cat src/Test.bs.js
534537
shell: bash
535-
working-directory: packages/test
538+
working-directory: ${{ steps.tmp-dir.outputs.path }}
536539

537540
publish:
538541
needs: [package, installationTest]

0 commit comments

Comments
 (0)