From 7fcd3d0b034113669570e4bd515ea7ac4f4cf096 Mon Sep 17 00:00:00 2001 From: Gautier DI FOLCO Date: Fri, 8 Sep 2023 20:14:44 +0200 Subject: [PATCH] fix(ci): cabal is not built with tests --- .github/workflows/compat.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/compat.yml b/.github/workflows/compat.yml index e5d72c4a..79c5a620 100644 --- a/.github/workflows/compat.yml +++ b/.github/workflows/compat.yml @@ -36,6 +36,19 @@ jobs: do sleep 1 done + - id: code-hash + name: Compute code directory hash + run: | + code_hash=$(git rev-parse HEAD:code | head -c 8)-$(git rev-parse HEAD:tests | head -c 8)-$(git rev-parse HEAD:bloodhound.cabal | head -c 8) + echo "code-hash=$code_hash" >> "$GITHUB_OUTPUT" + - name: Setup cache + id: cache-build + uses: actions/cache@v3 + with: + path: ~/.cabal/store + key: compat-build-${{ steps.code-hash.outputs.code-hash}} + - name: Build with tests + run: nix develop --command bash -c 'cabal v2-build --enable-tests' - name: Run tests run: nix develop --command bash -c 'cabal test' - name: Stop docker