Skip to content

Commit

Permalink
Merge pull request #43 from DeterminateSystems/graham/fh-272-detsys-t…
Browse files Browse the repository at this point in the history
…s-create-a-helper-to-assert-nix-is-available-ahead

Preflight nix, or don't fail
  • Loading branch information
grahamc authored Apr 18, 2024
2 parents 5e58ce0 + a112990 commit 6025e25
Show file tree
Hide file tree
Showing 6 changed files with 363 additions and 39 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
Expand All @@ -31,6 +31,19 @@ jobs:
- run: git status --porcelain=v1
- run: test $(git status --porcelain=v1 2>/dev/null | wc -l) -eq 0

test-no-nix:
name: "Test: Nix not installed"
runs-on: ubuntu-22.04
permissions:
id-token: "write"
contents: "read"
env:
ACTIONS_STEP_DEBUG: true
steps:
- uses: actions/checkout@v4
- name: Cache the store
uses: ./

run-x86_64-linux:
name: Run x86_64 Linux
runs-on: ubuntu-22.04
Expand All @@ -40,7 +53,7 @@ jobs:
env:
ACTIONS_STEP_DEBUG: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
Expand All @@ -62,7 +75,7 @@ jobs:
env:
ACTIONS_STEP_DEBUG: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
Expand All @@ -85,7 +98,7 @@ jobs:
env:
ACTIONS_STEP_DEBUG: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flakehub-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- nix-system: "x86_64-linux"
runner: "ubuntu-22.04"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
id-token: "write"
contents: "read"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
Expand Down
174 changes: 151 additions & 23 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6025e25

Please sign in to comment.