Skip to content

Commit

Permalink
refactor: use Cachix
Browse files Browse the repository at this point in the history
  • Loading branch information
farbodahm committed Nov 6, 2024
1 parent 6c39ebb commit b026565
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down

0 comments on commit b026565

Please sign in to comment.