From e9b80bd2ea17c3700a82230ece4f5e6a964fb6cc Mon Sep 17 00:00:00 2001 From: Martin Habovstiak Date: Mon, 23 Nov 2020 16:26:42 +0100 Subject: [PATCH 1/2] Run `cargo install` with `--locked` in `Dockerfile` This prevents `cargo` from changing the dependencies during build. Closes #329 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b2250d4..8c88dca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ RUN chown -R user . USER user -RUN cargo install --path . +RUN cargo install --locked --path . # Electrum RPC EXPOSE 50001 From 5a35e68b9613c76c04e4db6fcbf5c6f74c360262 Mon Sep 17 00:00:00 2001 From: Martin Habovstiak Date: Tue, 24 Nov 2020 16:10:05 +0100 Subject: [PATCH 2/2] Use --locked in tests This makes sure we test what's in `Cargo.lock` and not "random" dependencies. --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b0c2e13..2048a0b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -28,10 +28,10 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - args: --release --all + args: --locked --release --all - name: Test uses: actions-rs/cargo@v1 with: command: test - args: --release --all + args: --locked --release --all