From aec142cd8960a6588c57f23c96f25b82ffb9d7e2 Mon Sep 17 00:00:00 2001 From: Joseph LaFreniere Date: Sun, 23 Apr 2023 21:22:56 -0500 Subject: [PATCH] Use Nix to run `cargo test` in CI Using Nix ensures that known versions of all external dependencies (e.g. `poppler`) are available when running the tests. --- .github/workflows/ci.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76c3208..154f3b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,17 +35,11 @@ jobs: - name: Checkout sources uses: actions/checkout@v2 - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - name: Install nix + uses: cachix/install-nix-action@v18 - - name: Run cargo test - uses: actions-rs/cargo@v1 - with: - command: test + - name: Run tests + run: nix develop --command cargo test lints: name: Lints