Skip to content

Commit 172117a

Browse files
ci: install Rust in Docker for Linux tests\n\n- Install Rust toolchain in Docker container\n- Required for running tests since NAPI-RS may rebuild native modules
1 parent 33068b9 commit 172117a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/CI.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,16 @@ jobs:
280280
shell: bash
281281

282282
- name: Test bindings
283-
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim npm test
283+
run: |
284+
docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim bash -c '
285+
# Install Rust
286+
apt-get update && apt-get install -y curl build-essential
287+
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
288+
export PATH="/root/.cargo/bin:$PATH"
289+
290+
# Run tests
291+
npm test
292+
'
284293
285294
publish:
286295
name: Publish

0 commit comments

Comments
 (0)