Skip to content

Commit

Permalink
test demos
Browse files Browse the repository at this point in the history
  • Loading branch information
ibizaman committed Dec 27, 2023
1 parent d7411a7 commit a1f2e81
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,29 @@ jobs:
with:
name: selfhostblocks
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Test demos
run: |
cd ./demo/homeassistant/
nix run nixpkgs#nixos-rebuild -- build-vm-with-bootloader --fast -I nixos-config=./configuration.nix -I nixpkgs=.
QEMU_NET_OPTS="hostfwd=tcp::2222-:2222,hostfwd=tcp::8080-:80" ./result/bin/run-nixos-vm &
AGE_KEY=
while [ -z "$AGE_KEY" ]; do
sleep 1
AGE_KEY=$(nix shell nixpkgs#ssh-to-age --command sh -c 'ssh-keyscan -p 2222 -t ed25519 -4 localhost 2>/dev/null | ssh-to-age')
done
SOPS_AGE_KEY_FILE=keys.txt \
nix run --impure nixpkgs#sops -- --config sops.yaml -r -i \
--add-age $AGE_KEY ; \
secrets.yaml
chmod 600 sshkey
SSH_CONFIG_FILE=ssh_config nix run nixpkgs#colmena --impure -- apply
- name: Run tests
run: |
nix run github:Mic92/nix-fast-build -- \
Expand Down

0 comments on commit a1f2e81

Please sign in to comment.