Skip to content

Commit

Permalink
wip: try nix ci cache
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyg committed Sep 25, 2024
1 parent 229b6e6 commit 7365748
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,46 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: false
permissions:
id-token: "write"
contents: "read"

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install nix
uses: cachix/install-nix-action@v27
uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main

- name: Run `nix build`
run: nix develop

# - name: Set up cachix
# uses: cachix/cachix-action@v15
# with:
# name: holochain-ci

- name: Restore cargo and build from cache
uses: actions/cache/restore@v3
with:
path: |
.cargo
target
key: ${{ runner.os }}-build-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install nix packages
uses: nicknovitski/nix-develop@v1
# - name: Restore cargo and build from cache
# uses: actions/cache/restore@v3
# with:
# path: |
# .cargo
# target
# key: ${{ runner.os }}-build-${{ hashFiles('Cargo.lock') }}
# restore-keys: |
# ${{ runner.os }}-build-

- name: Install JS packages
run: npm ci
run: nix develop -c npm ci

- name: Clippy
run: npm run cargo:clippy
run: nix develop -c npm run cargo:clippy

- name: Check rust formatting
run: npm run cargo:fmt:check
run: nix develop -c npm run cargo:fmt:check

- name: Build Happ
run: npm run build:happ
run: nix develop -c npm run build:happ

- name: Save cargo and build to cache
uses: actions/cache/save@v3
Expand All @@ -65,4 +68,4 @@ jobs:
key: ${{ runner.os }}-build-${{ hashFiles('Cargo.lock') }}

- name: Test with tryorama
run: npm run test
run: nix develop -c npm run test

0 comments on commit 7365748

Please sign in to comment.