mirror of
https://github.com/Mic92/nixos-wiki-infra.git
synced 2024-11-28 11:14:34 +01:00
make deploy tests better
This commit is contained in:
parent
519c800589
commit
50af56517d
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
machine.wait_for_unit("phpfpm-mediawiki.service")
|
machine.wait_for_unit("phpfpm-mediawiki.service")
|
||||||
machine.wait_for_unit("nginx.service")
|
machine.wait_for_unit("nginx.service")
|
||||||
|
machine.wait_for_unit("mediawiki-init.service")
|
||||||
|
|
||||||
page = machine.succeed("curl -vL http://nixos-wiki.example.com/")
|
page = machine.succeed("curl -vL http://nixos-wiki.example.com/")
|
||||||
assert "MediaWiki has been installed" in page
|
assert "MediaWiki has been installed" in page
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
nix build .#checks.x86_64-linux.test .#nixosConfigurations.nixos-wiki-nixos-org.config.system.build.toplevel -L
|
set -euxo pipefail
|
||||||
|
|
||||||
|
nixBuild() {
|
||||||
|
if command -v nom -v &>/dev/null; then
|
||||||
|
nom build "$@"
|
||||||
|
else
|
||||||
|
nix build "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
nixBuild .#checks.x86_64-linux.test .#nixosConfigurations.nixos-wiki-nixos-org.config.system.build.toplevel -L
|
||||||
if ! nixos-rebuild switch --flake .#nixos-wiki-nixos-org --target-host root@wiki.nixos.org; then
|
if ! nixos-rebuild switch --flake .#nixos-wiki-nixos-org --target-host root@wiki.nixos.org; then
|
||||||
nixos-rebuild switch --flake .#nixos-wiki-nixos-org --target-host root@wiki.nixos.org
|
nixos-rebuild switch --flake .#nixos-wiki-nixos-org --target-host root@wiki.nixos.org
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user