Skip to content

Commit fa0ae25

Browse files
committed
Test installation of finished ReScript package on all platforms
1 parent fc1dc60 commit fa0ae25

File tree

4 files changed

+42
-1
lines changed

4 files changed

+42
-1
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,36 @@ jobs:
148148
path: |
149149
${{ steps.get_package_info.outputs.rescript_package }}
150150
${{ steps.get_package_info.outputs.stdlib_package }}
151+
152+
test:
153+
needs: package
154+
strategy:
155+
fail-fast: false
156+
matrix:
157+
os: [macos-latest, ubuntu-latest, windows-latest, macos-arm]
158+
159+
runs-on: ${{matrix.os}}
160+
161+
steps:
162+
- name: Checkout
163+
uses: actions/checkout@v3
164+
165+
- name: Use Node.js
166+
uses: actions/setup-node@v3
167+
with:
168+
node-version: 16
169+
170+
- name: Download artifacts
171+
uses: actions/download-artifact@v3
172+
with:
173+
name: npm-packages
174+
path: packages/test
175+
176+
- name: Install ReScript package
177+
run: npm i rescript-10*.tgz
178+
shell: bash
179+
working-directory: packages/test
180+
181+
- name: Test installation
182+
run: npm test
183+
working-directory: packages/test

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ scripts/deps.js
5252
scripts/format.js
5353
scripts/local_br_clean.sh
5454
scripts/setVersion.js
55-
packages/std/
55+
packages/

packages/test/Test.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Js.Console.log("Hello, world!")

packages/test/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "rescript-test",
3+
"version": "0.0.0",
4+
"scripts": {
5+
"test": "bsc Test.res"
6+
}
7+
}

0 commit comments

Comments
 (0)