From b274519bad0c78efe3d4c876f7bcba0fd7283317 Mon Sep 17 00:00:00 2001 From: wucke13 Date: Fri, 30 Jun 2023 21:23:04 +0200 Subject: [PATCH] add smoke test for devshell and test without nix This commit adds two new jobs. One checks that `cargo test` runs through, and second one checking that `cargo test` inside the nix devshell runs through as well. fixes #98 --- .github/workflows/qc.yaml | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/qc.yaml b/.github/workflows/qc.yaml index e4c6dc8..0675bd6 100644 --- a/.github/workflows/qc.yaml +++ b/.github/workflows/qc.yaml @@ -66,3 +66,43 @@ jobs: # - https://github.com/rosenpass/rosenpass/issues/62 # - https://github.com/rust-lang/rust/issues/108378 - run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --document-private-items + + cargo-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Install libsodium + run: sudo apt-get install -y libsodium-dev + - run: cargo test + + cargo-test-nix-devshell-x86_64-linux: + runs-on: + - ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - uses: cachix/install-nix-action@v21 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: cachix/cachix-action@v12 + with: + name: rosenpass + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + - run: nix develop --command cargo test