From b02656516322d418f442b40104996971bcccc164 Mon Sep 17 00:00:00 2001 From: Farbod Ahmadian Date: Wed, 6 Nov 2024 13:56:39 +0100 Subject: [PATCH] refactor: use Cachix --- .github/workflows/test.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 08a62d5..74a1d8e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,31 +13,32 @@ jobs: - uses: actions/checkout@v4 # Add a separate step to adjust permissions - - name: Adjust Permissions on Nix Store - run: sudo mkdir /nix && sudo chown -R $USER:$USER /nix/ + # - name: Adjust Permissions on Nix Store + # run: sudo mkdir /nix && sudo chown -R $USER:$USER /nix/ - - name: Cache Nix Store - uses: actions/cache@v3 - with: - path: /nix/store - key: nix-store-${{ runner.os }}-${{ hashFiles('**/shell.nix') }} - restore-keys: | - nix-store-${{ runner.os }}- + # - name: Cache Nix Store + # uses: actions/cache@v3 + # with: + # path: /nix/store + # key: nix-store-${{ runner.os }}-${{ hashFiles('**/shell.nix') }} + # restore-keys: | + # nix-store-${{ runner.os }}- - - name: Show caches packages - run: ls /nix/store + # - name: Show caches packages + # run: ls /nix/store - uses: cachix/install-nix-action@v26 - - uses: cachix/cachix-action@v14 - with: - name: devenv + - uses: DeterminateSystems/magic-nix-cache-action@main - name: Install devenv.sh run: nix profile install nixpkgs#devenv + - name: Build the devenv + run: devenv build + - name: Build the devenv shell and run any pre-commit hooks - run: ls /nix/store && nix-store --verify --check-contents + run: devenv test macos_tests: if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}