From 8b8d193b0c2ddde41323ef5638c27143a9355572 Mon Sep 17 00:00:00 2001 From: Ellen Marie Dash Date: Tue, 5 Nov 2024 13:56:15 -0500 Subject: [PATCH] Test that cargo-auditable=true causes cargo-auditable to be installed in a workflow. --- cargo-dist/tests/integration-tests.rs | 1 + cargo-dist/tests/snapshots/axolotlsay_basic.snap | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/cargo-dist/tests/integration-tests.rs b/cargo-dist/tests/integration-tests.rs index 4b13cc3bc..2014b896e 100644 --- a/cargo-dist/tests/integration-tests.rs +++ b/cargo-dist/tests/integration-tests.rs @@ -44,6 +44,7 @@ unix-archive = ".tar.gz" windows-archive = ".tar.gz" npm-scope ="@axodotdev" minimum-glibc-version = "2.18" +cargo-auditable = true [package.metadata.wix] upgrade-guid = "B36177BE-EA4D-44FB-B05C-EDDABDAA95CA" diff --git a/cargo-dist/tests/snapshots/axolotlsay_basic.snap b/cargo-dist/tests/snapshots/axolotlsay_basic.snap index d92377e6f..95f422059 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_basic.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_basic.snap @@ -3795,6 +3795,16 @@ jobs: with: name: cargo-dist-cache path: ~/.cargo/bin/dist + - name: Install cargo-auditable + # we specify bash to get pipefail; it guards against the `curl` command + # failing. otherwise `sh` won't catch that `curl` return non-0 + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-secure-code/cargo-auditable/releases/download/v0.6.4/cargo-auditable-installer.sh | sh" + shell: bash + - name: Cache cargo-auditable + uses: actions/upload-artifact@v4 + with: + name: cargo-auditable-cache + path: ~/.cargo/bin/cargo-auditable # sure would be cool if github gave us proper conditionals... # so here's a doubly-nested ternary-via-truthiness to try to provide the best possible # functionality based on whether this is a pull_request, and whether it's from a fork.