Skip to content

Commit

Permalink
Assert dnixd's presence or absence
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Sep 20, 2024
1 parent dcd28b5 commit a837deb
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ jobs:
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Validate dnixd is ${{ (matrix.extra-args == '--determinate') && 'installed' || 'uninstalled' }}"
run: |
if test -x /usr/local/bin/determinate-nixd; then
echo "determinate-nixd is present"
${{ (matrix.extra-args != '--determinate') && 'exit 1' }}
else
echo "determinate-nixd is not present"
${{ (matrix.extra-args == '--determinate') && 'exit 1' }}
fi
- name: Initial uninstall (without a `nix run` first)
run: sudo -E /nix/nix-installer uninstall
env:
Expand Down Expand Up @@ -205,6 +214,15 @@ jobs:
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Validate dnixd is ${{ (matrix.extra-args == '--determinate') && 'installed' || 'uninstalled' }}"
run: |
if test -x /usr/local/bin/determinate-nixd; then
echo "determinate-nixd is present"
${{ (matrix.extra-args != '--determinate') && 'exit 1' }}
else
echo "determinate-nixd is not present"
${{ (matrix.extra-args == '--determinate') && 'exit 1' }}
fi
- name: Ensure daemon was not configured with init
run: |
if systemctl is-active nix-daemon.socket; then
Expand Down Expand Up @@ -324,6 +342,15 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: |
trusted-users = root runner
- name: "Validate dnixd is ${{ (matrix.extra-args == '--determinate') && 'installed' || 'uninstalled' }}"
run: |
if test -x /usr/local/bin/determinate-nixd; then
echo "determinate-nixd is present"
${{ (matrix.extra-args != '--determinate') && 'exit 1' }}
else
echo "determinate-nixd is not present"
${{ (matrix.extra-args == '--determinate') && 'exit 1' }}
fi
- name: Initial uninstall (without a `nix run` first)
run: sudo -E /nix/nix-installer uninstall
env:
Expand Down Expand Up @@ -410,6 +437,15 @@ jobs:
log-directives: nix_installer=debug
backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Validate dnixd is ${{ (matrix.extra-args == '--determinate') && 'installed' || 'uninstalled' }}"
run: |
if test -x /usr/local/bin/determinate-nixd; then
echo "determinate-nixd is present"
${{ (matrix.extra-args != '--determinate') && 'exit 1' }}
else
echo "determinate-nixd is not present"
${{ (matrix.extra-args == '--determinate') && 'exit 1' }}
fi
- name: Initial uninstall (without a `nix run` first)
run: sudo -E /nix/nix-installer uninstall
env:
Expand Down Expand Up @@ -525,6 +561,15 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: |
trusted-users = root runner
- name: "Validate dnixd is ${{ (matrix.extra-args == '--determinate') && 'installed' || 'uninstalled' }}"
run: |
if test -x /usr/local/bin/determinate-nixd; then
echo "determinate-nixd is present"
${{ (matrix.extra-args != '--determinate') && 'exit 1' }}
else
echo "determinate-nixd is not present"
${{ (matrix.extra-args == '--determinate') && 'exit 1' }}
fi
- name: Initial uninstall (without a `nix run` first)
run: sudo -E /nix/nix-installer uninstall
env:
Expand Down

0 comments on commit a837deb

Please sign in to comment.